mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-28 15:09:39 -08:00
Merge pull request #167 from prometheus/refactor/tests/trailing-types
Convert trailing float64s.
This commit is contained in:
commit
e4e6e9a6f5
|
@ -40,7 +40,7 @@ type (
|
||||||
|
|
||||||
sample struct {
|
sample struct {
|
||||||
time time.Time
|
time time.Time
|
||||||
value float64
|
value model.SampleValue
|
||||||
}
|
}
|
||||||
|
|
||||||
sampleGroup struct {
|
sampleGroup struct {
|
||||||
|
@ -90,7 +90,7 @@ func (s sampleGroup) Get() (key, value coding.Encoder) {
|
||||||
for _, value := range s.values {
|
for _, value := range s.values {
|
||||||
series.Value = append(series.Value, &dto.SampleValueSeries_Value{
|
series.Value = append(series.Value, &dto.SampleValueSeries_Value{
|
||||||
Timestamp: proto.Int64(value.time.Unix()),
|
Timestamp: proto.Int64(value.time.Unix()),
|
||||||
Value: proto.Float64(value.value),
|
Value: value.value.ToDTO(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ func GetValueAtTimeTests(persistenceMaker func() (MetricPersistence, test.Closer
|
||||||
month time.Month
|
month time.Month
|
||||||
day int
|
day int
|
||||||
hour int
|
hour int
|
||||||
value float64
|
value model.SampleValue
|
||||||
}
|
}
|
||||||
|
|
||||||
type input struct {
|
type input struct {
|
||||||
|
@ -358,7 +358,7 @@ func GetBoundaryValuesTests(persistenceMaker func() (MetricPersistence, test.Clo
|
||||||
month time.Month
|
month time.Month
|
||||||
day int
|
day int
|
||||||
hour int
|
hour int
|
||||||
value float64
|
value model.SampleValue
|
||||||
}
|
}
|
||||||
|
|
||||||
type input struct {
|
type input struct {
|
||||||
|
@ -672,7 +672,7 @@ func GetRangeValuesTests(persistenceMaker func() (MetricPersistence, test.Closer
|
||||||
month time.Month
|
month time.Month
|
||||||
day int
|
day int
|
||||||
hour int
|
hour int
|
||||||
value float64
|
value model.SampleValue
|
||||||
}
|
}
|
||||||
|
|
||||||
type input struct {
|
type input struct {
|
||||||
|
|
Loading…
Reference in a new issue