I realized today that I've been saying something about the labels code that is not true and it's down to how the tests are being run.
The problem is that when we run the benchmark with no labels, we call the benchmark n times and show that as the runtime for Counter.inc(), but when we measure the performance of labels, instead of testing one set of labels we are testing a combinatorial set of labels and so each test run is not measuring Counter.inc() but instead m^k runs of Counter.inc.
So any time I increase the number of labels or the cardinality of them it looks like the new test runs slower but it's testing more values.
I'm still working out how to fix this. I made a couple pattern changes in a new benchmark, benchmarks/defaultMetrics.js but it'll need more than this.
I realized today that I've been saying something about the labels code that is not true and it's down to how the tests are being run.
The problem is that when we run the benchmark with no labels, we call the benchmark n times and show that as the runtime for
Counter.inc(), but when we measure the performance of labels, instead of testing one set of labels we are testing a combinatorial set of labels and so each test run is not measuringCounter.inc()but instead m^k runs of Counter.inc.So any time I increase the number of labels or the cardinality of them it looks like the new test runs slower but it's testing more values.
I'm still working out how to fix this. I made a couple pattern changes in a new benchmark, benchmarks/defaultMetrics.js but it'll need more than this.