Skip to content

Rework labels benchmarks to not misrepresent the relative speed of labels and no labels. #739

Description

@jdmarshall

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions