-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
53 lines (40 loc) · 1.55 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
plugins {
id("me.champeau.jmh")
id("com.github.johnrengelman.shadow")
id("otel.java-conventions")
}
dependencies {
jmh(platform(project(":dependencyManagement")))
jmh("io.opentelemetry:opentelemetry-api")
jmh("net.bytebuddy:byte-buddy-agent")
jmh(project(":instrumentation-api"))
jmh(project(":javaagent-instrumentation-api"))
jmh(project(":javaagent-tooling"))
jmh(project(":javaagent-extension-api"))
jmh("com.github.ben-manes.caffeine:caffeine")
jmh("javax.servlet:javax.servlet-api:4.0.1")
jmh("com.google.http-client:google-http-client:1.19.0")
jmh("org.eclipse.jetty:jetty-server:9.4.1.v20170120")
jmh("org.eclipse.jetty:jetty-servlet:9.4.1.v20170120")
// used to provide lots of classes for TypeMatchingBenchmark
jmh("org.springframework:spring-web:4.3.28.RELEASE")
}
jmh {
profilers.set(listOf("io.opentelemetry.benchmark.UsedMemoryProfiler", "gc"))
duplicateClassesStrategy.set(DuplicatesStrategy.EXCLUDE)
val jmhIncludeSingleClass: String? by project
if (jmhIncludeSingleClass != null) {
includes.set(listOf(jmhIncludeSingleClass))
}
}
tasks {
named("jmh") {
dependsOn(":javaagent:shadowJar")
}
}
/*
If using libasyncProfiler, use the following to generate nice svg flamegraphs.
sed '/unknown/d' benchmark/build/reports/jmh/profiler.txt | sed '/^thread_start/d' | sed '/not_walkable/d' > benchmark/build/reports/jmh/profiler-cleaned.txt
(using https://github.com/brendangregg/FlameGraph)
./flamegraph.pl --color=java benchmark/build/reports/jmh/profiler-cleaned.txt > benchmark/build/reports/jmh/jmh-main.svg
*/