Skip to content

Commit 6d896ee

Browse files
committed
update current benchmarks
1 parent 92fe05a commit 6d896ee

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

jmh-suite/src/main/java/org/cache2k/benchmark/jmh/suite/eviction/symmetrical/ZipfianSequenceBulkLoadingBenchmark.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class ZipfianSequenceBulkLoadingBenchmark extends BenchmarkBase {
5858
@Param({"110", "500"})
5959
public int percent = 0;
6060

61-
@Param({"100_000", "1000_000"})
61+
@Param({"100000", "1000000"})
6262
public int entryCount = 100_000;
6363

6464
/**
@@ -136,6 +136,7 @@ public void setup() throws Exception {
136136
public void tearDown() {
137137
MiscResultRecorderProfiler.addCounter("singleLoaderCalls", source.singleCallCount.longValue());
138138
MiscResultRecorderProfiler.addCounter("bulkLoaderCalls", source.bulkCallCount.longValue());
139+
MiscResultRecorderProfiler.setValue("cacheSize", cache.getSize(), "entries");
139140
RequestRecorder.recordMissCount(source.bulkMissCount.longValue() + source.singleCallCount.longValue());
140141
ForcedGcMemoryProfiler.keepReference(this);
141142
Cache2kMetricsRecorder.recordStatsAfterIteration(cache.toString());

jmh-suite/src/main/java/org/cache2k/benchmark/jmh/suite/eviction/symmetrical/ZipfianSequenceLoadingBenchmark.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.cache2k.benchmark.BenchmarkCacheLoader;
2626
import org.cache2k.benchmark.jmh.BenchmarkBase;
2727
import org.cache2k.benchmark.jmh.ForcedGcMemoryProfiler;
28+
import org.cache2k.benchmark.jmh.MiscResultRecorderProfiler;
2829
import org.cache2k.benchmark.util.ZipfianPattern;
2930
import org.openjdk.jmh.annotations.Benchmark;
3031
import org.openjdk.jmh.annotations.BenchmarkMode;
@@ -126,6 +127,7 @@ public void setup() throws Exception {
126127
@TearDown(Level.Iteration)
127128
public void tearDown() {
128129
RequestRecorder.recordMissCount(source.missCount.longValue());
130+
MiscResultRecorderProfiler.setValue("cacheSize", cache.getSize(), "entries");
129131
ForcedGcMemoryProfiler.keepReference(this);
130132
String statString = cache.toString();
131133
System.out.println(statString);

processJmhResults.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -878,8 +878,21 @@ fi
878878
(
879879
header4 "$prods";
880880
local tmp="$RESULT/tmp-plotOps-$name-$param$tmpext.data"
881+
# old query: jq -r ".[] | select (.benchmark | contains (\".${name}\") ) | [ (.threads | tostring) + \"-\" + .params.entryCount + \"-\" + .params.$param, .params.cacheFactory, .primaryMetric.score, .primaryMetric.scoreError, .primaryMetric.scoreConfidence[0], .primaryMetric.scoreConfidence[1] ] | @csv" | \
882+
local query=`cat << EOF
883+
.[] | select (.benchmark | contains (".${name}") ) |
884+
[ (.threads | tostring) + "-" + .params.entryCount + "-" + .params.$param,
885+
.params.cacheFactory,
886+
.["secondaryMetrics"]["requests"].score,
887+
.["secondaryMetrics"]["requests"].scoreError,
888+
.["secondaryMetrics"]["requests"].scoreConfidence[0],
889+
.["secondaryMetrics"]["requests"].scoreConfidence[1]
890+
] | @csv
891+
EOF
892+
`
893+
881894
test -f "$tmp" || json | \
882-
jq -r ".[] | select (.benchmark | contains (\".${name}\") ) | [ (.threads | tostring) + \"-\" + .params.entryCount + \"-\" + .params.$param, .params.cacheFactory, .primaryMetric.score, .primaryMetric.scoreError, .primaryMetric.scoreConfidence[0], .primaryMetric.scoreConfidence[1] ] | @csv" | \
895+
jq -r "$query" | \
883896
sort | tr -d '"' | \
884897
pivot4 $prods | \
885898
sort -n -t- -k1,1 -k2,2 -k3,3 | shortenParamValues > "$tmp"
@@ -1073,7 +1086,7 @@ for I in $benchmarks; do
10731086
done
10741087

10751088
# benchmarks with percent parameter
1076-
benchmarks="ZipfianSequenceLoadingBenchmark PrecalculatedZipfianSequenceLoadingBenchmark"
1089+
benchmarks="ZipfianSequenceLoadingBenchmark PrecalculatedZipfianSequenceLoadingBenchmark ZipfianSequenceBulkLoadingBenchmark"
10771090
for I in $benchmarks; do
10781091
noBenchmark $I || {
10791092
plotOps $I percent;

0 commit comments

Comments
 (0)