Refactor schema

* Remove redundant scope
* Change Series Id type to string
* Adopt golang structs to schema
This commit is contained in:
Jan Eitzinger
2023-03-22 19:21:11 +01:00
parent def35a551a
commit 1f8c6064e2
15 changed files with 247 additions and 342 deletions

View File

@@ -369,12 +369,11 @@ func TestRestApi(t *testing.T) {
"load_one": map[schema.MetricScope]*schema.JobMetric{
schema.MetricScopeNode: {
Unit: schema.Unit{Base: "load"},
Scope: schema.MetricScopeNode,
Timestep: 60,
Series: []schema.Series{
{
Hostname: "host123",
Statistics: &schema.MetricStatistics{Min: 0.1, Avg: 0.2, Max: 0.3},
Statistics: schema.MetricStatistics{Min: 0.1, Avg: 0.2, Max: 0.3},
Data: []schema.Float{0.1, 0.1, 0.1, 0.2, 0.2, 0.2, 0.3, 0.3, 0.3},
},
},