census-instrumentation / opencensus-go

A stats collection and distributed tracing framework
http://opencensus.io
Apache License 2.0
2.05k stars 327 forks source link

Register metrics in benchmark #1266

Closed howardjohn closed 2 years ago

howardjohn commented 2 years ago

Currently, the metric we record is not registered. This hits the fast-path code of not actually recording the metric, so we miss out on detecting any performance to that main code path.

This registers the metrics so we actually trigger record.

Related: https://github.com/census-instrumentation/opencensus-go/issues/1265

dashpole commented 2 years ago

I went ahead and merged https://github.com/census-instrumentation/opencensus-go/pull/1267, which includes this change