debug_metrics.h 486 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <yt/cpp/mapreduce/interface/config.h>
  3. #include <util/generic/strbuf.h>
  4. namespace NYT {
  5. namespace NDetail {
  6. void IncDebugMetricImpl(TStringBuf name);
  7. // Helper functions that allows to track various events inside YT library, useful for testing.
  8. inline void IncDebugMetric(TStringBuf name)
  9. {
  10. if (TConfig::Get()->EnableDebugMetrics) {
  11. IncDebugMetricImpl(name);
  12. }
  13. }
  14. ui64 GetDebugMetric(TStringBuf name);
  15. } // namespace NDetail
  16. } // namespace NYT