incubator-pegasus icon indicating copy to clipboard operation
incubator-pegasus copied to clipboard

Feature(new_metrics): migrate metrics of server and other levels

Open empiredan opened this issue 2 years ago • 0 comments

The number of metrics that are attached to server-level entity is the largest among all kinds of entities. They are distributed very widely on classes and source files.

Thus server-level entity can just be defined in metrics.cpp. Once a metric is attached to the server entity, declare the entity at the header of the source file. The migration for server-level metrics can be divided into following tasks:

  • [ ] https://github.com/apache/incubator-pegasus/issues/1414
  • [ ] https://github.com/apache/incubator-pegasus/issues/1321
  • [ ] https://github.com/apache/incubator-pegasus/issues/1329
  • [x] https://github.com/apache/incubator-pegasus/issues/1425
  • [ ] https://github.com/apache/incubator-pegasus/issues/1331
  • [x] https://github.com/apache/incubator-pegasus/issues/1441
  • [x] https://github.com/apache/incubator-pegasus/issues/1454
  • [x] https://github.com/apache/incubator-pegasus/issues/1481

Following metrics are the members of pegasus_event_listener (pegasus_event_listener.cpp), which is created at the construction of pegasus_server_impl:

Variables Types/Computations
_pfc_recent_flush_completed_count increase(Counter)
_pfc_recent_flush_output_bytes increase(Counter)
_pfc_recent_compaction_completed_count increase(Counter)
_pfc_recent_compaction_input_bytes increase(Counter)
_pfc_recent_compaction_output_bytes increase(Counter)
_pfc_recent_write_change_delayed_count increase(Counter)
_pfc_recent_write_change_stopped_count increase(Counter)

Following metrics are the members of ship_mutation (duplication_pipeline.cpp), which is created at replica_duplicator::start_dup_log():

Variables Types/Computations
_counter_dup_shipped_bytes_rate rate(Counter)

empiredan avatar Jan 28 '23 09:01 empiredan