This repository was archived by the owner on Jun 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
benchmarks-api/src/main/java/io/scalecube/benchmarks Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 6
6
import com .codahale .metrics .Histogram ;
7
7
import com .codahale .metrics .Meter ;
8
8
import com .codahale .metrics .Timer ;
9
+ import com .codahale .metrics .jvm .GarbageCollectorMetricSet ;
9
10
import com .codahale .metrics .jvm .MemoryUsageGaugeSet ;
11
+ import com .codahale .metrics .jvm .ThreadStatesGaugeSet ;
10
12
11
13
import reactor .core .Exceptions ;
12
14
import reactor .core .publisher .Flux ;
@@ -91,8 +93,6 @@ public final void start() {
91
93
92
94
LOGGER .info ("Benchmarks settings: " + settings );
93
95
94
- settings .registry ().register (settings .taskName () + "-memory" , new MemoryUsageGaugeSet ());
95
-
96
96
if (settings .consoleReporterEnabled ()) {
97
97
consoleReporter = ConsoleReporter .forRegistry (settings .registry ())
98
98
.outputTo (System .out )
@@ -120,6 +120,10 @@ public final void start() {
120
120
throw new IllegalStateException ("BenchmarksState beforeAll() failed: " + ex , ex );
121
121
}
122
122
123
+ settings .registry ().register (settings .taskName () + "-gc" , new GarbageCollectorMetricSet ());
124
+ settings .registry ().register (settings .taskName () + "-memory" , new MemoryUsageGaugeSet ());
125
+ settings .registry ().register (settings .taskName () + "-threads" , new ThreadStatesGaugeSet ());
126
+
123
127
if (settings .consoleReporterEnabled ()) {
124
128
consoleReporter .start (settings .reporterInterval ().toMillis (), TimeUnit .MILLISECONDS );
125
129
}
You can’t perform that action at this time.
0 commit comments