Specialize ScalarMetricImpl for no-attribute case

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Networking & Observability
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      For many metrics we collect, we don't need to use attributes. This includes counters for query framework, plan cache metrics, and fast-path metrics.

      The ScalarMetricImpl class provides atomic access to these metrics (for both serverStatus and OTel) and includes a map keyed on Attribute. This map lookup adds measurable overhead to benchmarks, notable the findOne SEP benchmark.

      Claude suggested specializing this class to avoid overhead of the map access for the counters that don't use attributes.

            Assignee:
            Didier Nadeau
            Reporter:
            Chris Wolff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: