We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9e65a3 commit 057febbCopy full SHA for 057febb
cmd/test-exporter/main.go
@@ -42,8 +42,9 @@ func main() {
42
}))
43
44
runner.Add(test.NewSimpleTestCase("sine_wave", func(t time.Time) float64 {
45
- degrees := t.Sub(unixStart).Seconds() * (float64(runnerConfig.ScrapeInterval) / float64(time.Second))
46
- radians := (degrees * math.Pi) / 180.
+ // With a 15-second scrape interval this gives a ten-minute period
+ period := 40 * runnerConfig.ScrapeInterval.Seconds()
47
+ radians := float64(t.Unix()) / period * 2 * math.Pi
48
return math.Sin(radians)
49
50
0 commit comments