Skip to content
This repository was archived by the owner on Jun 20, 2025. It is now read-only.

Commit dff8413

Browse files
authored
Merge pull request #98 from scalecube/feature/get-rid-of-if-condition-in-benchm-meter
Removed `if` condition around benchamrks meter; Meter shouldn;'t dep…
2 parents 4f48a7c + d7f6fdc commit dff8413

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

benchmarks-api/src/main/java/io/scalecube/benchmarks/BenchmarkSettings.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ public class BenchmarkSettings {
1717

1818
private static final int N_THREADS = Runtime.getRuntime().availableProcessors();
1919
private static final int CONCURRENCY = 16;
20-
private static final Duration EXECUTION_TASK_DURATION = Duration.ofSeconds(120);
20+
private static final Duration EXECUTION_TASK_DURATION = Duration.ofSeconds(360);
2121
private static final Duration EXECUTION_TASK_INTERVAL = Duration.ZERO;
2222
private static final Duration MIN_INTERVAL = Duration.ofMillis(100);
2323
private static final Duration REPORTER_INTERVAL = Duration.ofSeconds(3);
2424
private static final TimeUnit DURATION_UNIT = TimeUnit.MILLISECONDS;
2525
private static final TimeUnit RATE_UNIT = TimeUnit.SECONDS;
2626
private static final long NUM_OF_ITERATIONS = Long.MAX_VALUE;
27-
private static final Duration WARM_UP_DURATION = Duration.ofSeconds(20);
27+
private static final Duration WARM_UP_DURATION = Duration.ofSeconds(45);
2828
private static final Duration RAMP_UP_DURATION = Duration.ofSeconds(10);
2929
private static final Duration RAMP_UP_INTERVAL = Duration.ofSeconds(1);
3030
private static final boolean CONSOLE_REPORTER_ENABLED = true;

benchmarks-api/src/main/java/io/scalecube/benchmarks/metrics/CodahaleBenchmarkMetrics.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,12 @@ public BenchmarkMeter meter(String name) {
5252
return new BenchmarkMeter() {
5353
@Override
5454
public void mark() {
55-
if (enabled.get()) {
56-
meter.mark();
57-
}
55+
meter.mark();
5856
}
5957

6058
@Override
6159
public void mark(long value) {
62-
if (enabled.get()) {
63-
meter.mark(value);
64-
}
60+
meter.mark(value);
6561
}
6662
};
6763
}

0 commit comments

Comments
 (0)