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: tests/reexecute/c/README.md
+9-2Lines changed: 9 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,14 @@ export AWS_REGION=us-east-2
42
42
43
43
### Metrics Collection
44
44
45
-
If running with metrics collection, enabled in CI and configured locally with `METRICS_ENABLED=true`, follow the instructions in the e2e [README](../../e2e/README.md#monitoring) to set the required Prometheus environment variables.
45
+
If running locally, metrics collection can be customized via the following parameters:
46
+
47
+
-`METRICS_SERVER_ENABLED`: starts a Prometheus server exporting VM metrics.
48
+
-`METRICS_COLLECTOR_ENABLED`: starts a Prometheus collector (if enabled, then `METRICS_SERVER_ENABLED` must be enabled as well).
49
+
50
+
When utilizing the metrics collector feature, follow the instructions in the e2e [README](../../e2e/README.md#monitoring) to set the required Prometheus environment variables.
51
+
52
+
Running the re-execution test in CI will always set `METRICS_SERVER_ENABLED=true` and `METRICS_COLLECTOR_ENABLED=true`.
46
53
47
54
## Quick Start
48
55
@@ -230,7 +237,7 @@ The `CONFIG` parameter currently only supports pre-defined configs and not passi
230
237
231
238
The C-Chain benchmarks export VM metrics to the same Grafana instance as AvalancheGo CI: https://grafana-poc.avax-dev.network/.
232
239
233
-
To export metrics for a local run, simply set the Taskfile variable `METRICS_ENABLED=true` either via environment variable or passing it at the command line.
240
+
To export metrics for a local run, simply set the Taskfile variables `METRICS_SERVER_ENABLED=true` and `METRICS_COLLECTOR_ENABLED=true` either via environment variable or passing it at the command line.
234
241
235
242
You can view granular C-Chain processing metrics with the label attached to this job (job="c-chain-reexecution") [here](https://grafana-poc.avax-dev.network/d/Gl1I20mnk/c-chain?orgId=1&from=now-5m&to=now&timezone=browser&var-datasource=P1809F7CD0C75ACF3&var-filter=job%7C%3D%7Cc-chain-reexecution&var-chain=C&refresh=10s).
Copy file name to clipboardExpand all lines: tests/reexecute/c/vm_reexecute_test.go
+56-24Lines changed: 56 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,6 @@ package vm
6
6
import (
7
7
"context"
8
8
"encoding/binary"
9
-
"errors"
10
9
"flag"
11
10
"fmt"
12
11
"maps"
@@ -61,10 +60,12 @@ var (
61
60
startBlockArguint64
62
61
endBlockArguint64
63
62
chanSizeArgint
64
-
metricsEnabledArgbool
65
63
executionTimeout time.Duration
66
64
labelsArgstring
67
65
66
+
metricsServerEnabledArgbool
67
+
metricsCollectorEnabledArgbool
68
+
68
69
networkUUIDstring=uuid.NewString()
69
70
labels=map[string]string{
70
71
"job": "c-chain-reexecution",
@@ -103,7 +104,8 @@ func TestMain(m *testing.M) {
103
104
flag.IntVar(&chanSizeArg, "chan-size", 100, "Size of the channel to use for block processing.")
104
105
flag.DurationVar(&executionTimeout, "execution-timeout", 0, "Benchmark execution timeout. After this timeout has elapsed, terminate the benchmark without error. If 0, no timeout is applied.")
flag.BoolVar(&metricsServerEnabledArg, "metrics-server-enabled", false, "Whether to enable the metrics server.")
108
+
flag.BoolVar(&metricsCollectorEnabledArg, "metrics-collector-enabled", false, "Whether to enable the metrics collector (if true, then metrics-server-enabled must be true as well).")
107
109
flag.StringVar(&labelsArg, "labels", "", "Comma separated KV list of metric labels to attach to all exported metrics. Ex. \"owner=tim,runner=snoopy\"")
0 commit comments