horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Implement MetricManager

Open jiacai2050 opened this issue 1 year ago • 0 comments

The main task of MetricManager is to manage metric name of a sample, it will:

  1. Calculate the id for metric name, using seahash. Since there is no field concept in prometheus, we could use a hard-coded one, such as value, and its type is f64.
  2. Persist new name to storage. For existing metric name, we should avoid this step, since it will involve IO operation.
  3. In order to support 2, we need to add a cache, and when server start up, we load all existing metric name into cache.

jiacai2050 avatar Jan 15 '25 06:01 jiacai2050