This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo field, total, doc_values, inverted_index, points | |
curl -s $1 | | |
jq -r '. | |
| to_entries | |
| .[] | |
| select(.key != "_shards") | |
| .value.fields | |
| to_entries | |
| .[] | |
| "\(.key), \(.value.total_in_bytes), \(.value.doc_values_in_bytes), \(.value.inverted_index.total_in_bytes), \(.value.points_in_bytes)"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PUT test | |
{ | |
"mappings": { | |
"dynamic": "runtime", | |
"properties": { | |
"service": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "keyword" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE /profile?ignore_unavailable=true | |
PUT /profile | |
{ | |
"settings": { | |
"index": { | |
"codec": "best_compression" | |
} | |
}, | |
"mappings": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.shadeproof; | |
import net.bytebuddy.ByteBuddy; | |
public abstract class NativeBinding { | |
public static final NativeBinding INSTANCE; | |
static { | |
String expected = "!com!shadeproof!NativeBinding!"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
attach () { | |
if [[ $(docker inspect ${container_id} | jq --raw-output .[0].Config.Cmd[0]) == java ]] | |
then | |
echo attaching to $(docker ps --no-trunc | grep ${container_id}) | |
docker cp /Users/felixbarnsteiner/Applications/apm/apm-agent-attach-1.6.1.jar ${container_id}:/apm-agent-attach.jar | |
docker exec ${container_id} java -jar /apm-agent-attach.jar --config | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Metric-based transaction breakdown example | |
# Paste in Kibana Dev Tools to try it out | |
# This example contains two hosts (host-a and host-b). | |
# One transaction (APIRestController#orders) which only has spans of type `db` | |
# On host a, there were 10 transactions each taking 40ms and consisting of 10 `db` calls, each taking 1ms on average (30ms transaction self_time) | |
# On host b, there were 5 transactions each taking 40ms and consisting of 15 `db` calls, each taking 1.333ms on average (20ms transaction self_time) | |
DELETE /apm-metrics?ignore_unavailable=true |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"jmhVersion" : "1.21", | |
"benchmark" : "co.elastic.apm.agent.benchmark.ElasticApmActiveContinuousBenchmark.benchmarkWithApm", | |
"mode" : "sample", | |
"threads" : 8, | |
"forks" : 1, | |
"jvm" : "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java", | |
"jvmArgs" : [ | |
"-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=53415:/Applications/IntelliJ IDEA.app/Contents/bin", |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"jmhVersion" : "1.21", | |
"benchmark" : "co.elastic.apm.agent.benchmark.ElasticApmActiveContinuousBenchmark.benchmarkWithApm", | |
"mode" : "sample", | |
"threads" : 16, | |
"forks" : 1, | |
"jvm" : "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java", | |
"jvmArgs" : [ | |
"-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=60247:/Applications/IntelliJ IDEA.app/Contents/bin", |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"jmhVersion" : "1.21", | |
"benchmark" : "co.elastic.apm.agent.benchmark.ElasticApmActiveContinuousBenchmark.benchmarkWithApm", | |
"mode" : "sample", | |
"threads" : 16, | |
"forks" : 1, | |
"jvm" : "/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home/bin/java", | |
"jvmArgs" : [ | |
"-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=60273:/Applications/IntelliJ IDEA.app/Contents/bin", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.jstage.shop.commons.utils; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.atomic.AtomicReference; | |
public class BlockingAtomicReference<V> extends AtomicReference<V> { | |
private final CountDownLatch initialized = new CountDownLatch(1); | |
/** |
NewerOlder