Skip to content

Commit 7000a56

Browse files
committed
Intermediate changes
commit_hash:c11c6b66478d65d470f62bb79946ef21af2389a7
1 parent dbc58e8 commit 7000a56

File tree

5 files changed

+9
-1
lines changed

5 files changed

+9
-1
lines changed

yt/yt/library/profiling/solomon/config.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ void TSolomonExporterConfig::Register(TRegistrar registrar)
4444
.Default(true);
4545
registrar.Parameter("convert_counters_to_delta_gauge", &TThis::ConvertCountersToDeltaGauge)
4646
.Default(false);
47-
4847
registrar.Parameter("enable_histogram_compat", &TThis::EnableHistogramCompat)
4948
.Default(false);
49+
registrar.Parameter("report_timestamps_for_rate_metrics", &TThis::ReportTimestampsForRateMetrics)
50+
.Default(true);
5051

5152
registrar.Parameter("export_summary", &TThis::ExportSummary)
5253
.Default(false);

yt/yt/library/profiling/solomon/config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ struct TSolomonExporterConfig
4242
bool RenameConvertedCounters;
4343
bool ConvertCountersToDeltaGauge;
4444
bool EnableHistogramCompat;
45+
bool ReportTimestampsForRateMetrics;
4546

4647
bool ExportSummary;
4748
bool ExportSummaryAsMax;

yt/yt/library/profiling/solomon/cube.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ int TCube<T>::ReadSensors(
462462
consumer->OnDouble(time, value.SecondsFloat());
463463
}
464464
} else {
465+
if (!options.ReportTimestampsForRateMetrics) {
466+
time = TInstant::Zero();
467+
}
468+
465469
// TODO(prime@): RATE is incompatible with windowed read.
466470
if constexpr (std::is_same_v<T, i64>) {
467471
consumer->OnInt64(time, Rollup(*window, indices.back()));

yt/yt/library/profiling/solomon/cube.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct TReadOptions
2828
bool RenameConvertedCounters = true;
2929
double RateDenominator = 1.0;
3030
bool EnableHistogramCompat = false;
31+
bool ReportTimestampsForRateMetrics = true;
3132

3233
bool EnableSolomonAggregationWorkaround = false;
3334

yt/yt/library/profiling/solomon/exporter.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ void TSolomonExporter::DoHandleShard(
644644
options.Times = readWindow;
645645
options.SummaryPolicy = Config_->GetSummaryPolicy();
646646
options.MarkAggregates = Config_->MarkAggregates;
647+
options.ReportTimestampsForRateMetrics = Config_->ReportTimestampsForRateMetrics;
647648
options.StripSensorsNamePrefix = Config_->StripSensorsNamePrefix;
648649
options.LingerWindowSize = Config_->LingerTimeout / gridStep;
649650

0 commit comments

Comments
 (0)