diff options
| author | robot-piglet <[email protected]> | 2025-02-19 15:12:08 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2025-02-19 15:40:26 +0300 |
| commit | 7000a56ca5209208b754b5fe7f46e96966016443 (patch) | |
| tree | d2475cfdbe827d61f2fd8e3985a37e973ed94609 | |
| parent | dbc58e8a3b624feb7bccd730530e520da549e859 (diff) | |
Intermediate changes
commit_hash:c11c6b66478d65d470f62bb79946ef21af2389a7
| -rw-r--r-- | yt/yt/library/profiling/solomon/config.cpp | 3 | ||||
| -rw-r--r-- | yt/yt/library/profiling/solomon/config.h | 1 | ||||
| -rw-r--r-- | yt/yt/library/profiling/solomon/cube.cpp | 4 | ||||
| -rw-r--r-- | yt/yt/library/profiling/solomon/cube.h | 1 | ||||
| -rw-r--r-- | yt/yt/library/profiling/solomon/exporter.cpp | 1 |
5 files changed, 9 insertions, 1 deletions
diff --git a/yt/yt/library/profiling/solomon/config.cpp b/yt/yt/library/profiling/solomon/config.cpp index 3138e4c8b60..e43b7478344 100644 --- a/yt/yt/library/profiling/solomon/config.cpp +++ b/yt/yt/library/profiling/solomon/config.cpp @@ -44,9 +44,10 @@ void TSolomonExporterConfig::Register(TRegistrar registrar) .Default(true); registrar.Parameter("convert_counters_to_delta_gauge", &TThis::ConvertCountersToDeltaGauge) .Default(false); - registrar.Parameter("enable_histogram_compat", &TThis::EnableHistogramCompat) .Default(false); + registrar.Parameter("report_timestamps_for_rate_metrics", &TThis::ReportTimestampsForRateMetrics) + .Default(true); registrar.Parameter("export_summary", &TThis::ExportSummary) .Default(false); diff --git a/yt/yt/library/profiling/solomon/config.h b/yt/yt/library/profiling/solomon/config.h index 0ff84c96d2b..ebd63cca2ed 100644 --- a/yt/yt/library/profiling/solomon/config.h +++ b/yt/yt/library/profiling/solomon/config.h @@ -42,6 +42,7 @@ struct TSolomonExporterConfig bool RenameConvertedCounters; bool ConvertCountersToDeltaGauge; bool EnableHistogramCompat; + bool ReportTimestampsForRateMetrics; bool ExportSummary; bool ExportSummaryAsMax; diff --git a/yt/yt/library/profiling/solomon/cube.cpp b/yt/yt/library/profiling/solomon/cube.cpp index 52a106556f7..e5ecef6b7ff 100644 --- a/yt/yt/library/profiling/solomon/cube.cpp +++ b/yt/yt/library/profiling/solomon/cube.cpp @@ -462,6 +462,10 @@ int TCube<T>::ReadSensors( consumer->OnDouble(time, value.SecondsFloat()); } } else { + if (!options.ReportTimestampsForRateMetrics) { + time = TInstant::Zero(); + } + // TODO(prime@): RATE is incompatible with windowed read. if constexpr (std::is_same_v<T, i64>) { consumer->OnInt64(time, Rollup(*window, indices.back())); diff --git a/yt/yt/library/profiling/solomon/cube.h b/yt/yt/library/profiling/solomon/cube.h index 061ca24bc1f..41c687a361e 100644 --- a/yt/yt/library/profiling/solomon/cube.h +++ b/yt/yt/library/profiling/solomon/cube.h @@ -28,6 +28,7 @@ struct TReadOptions bool RenameConvertedCounters = true; double RateDenominator = 1.0; bool EnableHistogramCompat = false; + bool ReportTimestampsForRateMetrics = true; bool EnableSolomonAggregationWorkaround = false; diff --git a/yt/yt/library/profiling/solomon/exporter.cpp b/yt/yt/library/profiling/solomon/exporter.cpp index d879573c60e..ee2d0e75b51 100644 --- a/yt/yt/library/profiling/solomon/exporter.cpp +++ b/yt/yt/library/profiling/solomon/exporter.cpp @@ -644,6 +644,7 @@ void TSolomonExporter::DoHandleShard( options.Times = readWindow; options.SummaryPolicy = Config_->GetSummaryPolicy(); options.MarkAggregates = Config_->MarkAggregates; + options.ReportTimestampsForRateMetrics = Config_->ReportTimestampsForRateMetrics; options.StripSensorsNamePrefix = Config_->StripSensorsNamePrefix; options.LingerWindowSize = Config_->LingerTimeout / gridStep; |
