You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: book/src/libs/wasp/benchspy/reports/new_executor.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# BenchSpy - Adding a New QueryExecutor
2
2
3
+
# QueryExecutor interface
4
+
3
5
As mentioned earlier, the `StandardReport` supports three different data sources:
4
6
-`Direct`
5
7
-`Loki`
@@ -48,4 +50,18 @@ By default, `StandardReport` calculates the test time range automatically by ana
48
50
49
51
---
50
52
51
-
With these details in mind, you should have a clear path to implementing your own `QueryExecutor` and integrating it seamlessly with `BenchSpy`'s `StandardReport`.
53
+
With these details in mind, you should have a clear path to implementing your own `QueryExecutor` and integrating it seamlessly with `BenchSpy`'s `StandardReport`.
54
+
55
+
# NamedGenerator interface
56
+
57
+
Executors that query load generation metrics should also implement this simple interface:
58
+
```go
59
+
typeNamedGeneratorinterface {
60
+
// GeneratorName returns the name of the generator
61
+
GeneratorName() string
62
+
}
63
+
```
64
+
65
+
It is used primarly, when casting results from `map[string]interface{}` to target type, while splitting them between different generators.
66
+
67
+
Currently, this interface is implemented by `Direct` and `Loki` exectors, but not by `Prometheus`.
0 commit comments