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
correct propagation of context, no mutex -> use errgroup instead, one more test for 2 loki queries; query executor and loki parallelization; added todo
Copy file name to clipboardExpand all lines: wasp/benchspy/types.go
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,9 @@
1
1
package benchspy
2
2
3
-
import"time"
3
+
import (
4
+
"context"
5
+
"time"
6
+
)
4
7
5
8
typeReportinterface {
6
9
// Store stores the report in a persistent storage and returns the path to it, or an error
@@ -17,7 +20,7 @@ type QueryExecutor interface {
17
20
// Validate checks if the QueryExecutor has all the necessary data and configuration to execute the queries
18
21
Validate() error
19
22
// Execute executes the queries and populates the QueryExecutor with the results
20
-
Execute() error
23
+
Execute(ctx context.Context) error
21
24
// Results returns the results of the queries, where key is the name of the query and value is the result
22
25
Results() map[string][]string
23
26
// IsComparable checks whether both QueryExecutors can be compared (e.g. they have the same type, queries are the same, etc.), and returns an error (if any difference is found)
0 commit comments