TestDatasource: Add scenario for generating trace data (#59299)

This commit is contained in:
Andrej Ocenas
2022-11-29 22:50:01 +01:00
committed by GitHub
parent 1481ace528
commit 038c97f31c
4 changed files with 61 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ const (
rawFrameQuery queryType = "raw_frame"
csvFileQueryType queryType = "csv_file"
csvContentQueryType queryType = "csv_content"
traceType queryType = "trace"
)
type queryType string
@@ -218,6 +219,11 @@ Timestamps will line up evenly on timeStepSeconds (For example, 60 seconds means
handler: s.handleCsvContentScenario,
})
s.registerScenario(&Scenario{
ID: string(traceType),
Name: "Trace",
})
s.queryMux.HandleFunc("", s.handleFallbackScenario)
}