tikv / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
120 stars 93 forks source link

Add perf flag #373

Closed v01dstar closed 2 months ago

v01dstar commented 2 months ago

This PR includes:

Adding PerfFlag: Collect statistics for specific metrics while ignoring others to reduce performance overhead from excessive tracking. See PingCAP internal design doc.

Each metric in PerfContext and IOStatsContext is associated with a bit in PerfFlag, indicating whether to enable the collection of statistics for that specific metric. Any omissions (field exists in PerfContext or IOStatsContext but does not exist in PerfFlag) will result in a compile-time error.

v01dstar commented 2 months ago

/run-all-tests

ti-chi-bot[bot] commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Connor1996, LykxSassinator

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/tikv/rocksdb/blob/8.10.tikv/OWNERS)~~ [Connor1996,LykxSassinator] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ti-chi-bot[bot] commented 2 months ago

[LGTM Timeline notifier]

Timeline: