MM-58281 Allow client metrics to be floats and round timestamps (#27027)
* MM-58281 Allow client metrics to be floats and round timestamps * MM-58281 Fix report version * Ensure reports can contain a single timestamp * Round timestamps in unit tests
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
617053e206
Коммит
6cf93ea480
@@ -35,7 +35,7 @@ var (
|
||||
|
||||
type MetricSample struct {
|
||||
Metric MetricType `json:"metric"`
|
||||
Value int64 `json:"value"`
|
||||
Value float64 `json:"value"`
|
||||
Timestamp int64 `json:"timestamp,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
}
|
||||
@@ -65,7 +65,7 @@ func (r *PerformanceReport) IsValid() error {
|
||||
return fmt.Errorf("report version is not supported: server version: %s, report version: %s", performanceReportVersion.String(), r.Version)
|
||||
}
|
||||
|
||||
if r.Start >= r.End {
|
||||
if r.Start > r.End {
|
||||
return fmt.Errorf("report timestamps are erroneous")
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user