mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-10 23:12:41 +08:00
feat: group metrics with instance uuid
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# Release History
|
# Release History
|
||||||
|
|
||||||
## v0.3.0 (2021-12-21)
|
## v0.3.0 (2021-12-22)
|
||||||
|
|
||||||
- feat: implement transaction mechanism for load test
|
- feat: implement transaction mechanism for load test
|
||||||
- feat: support `--continue-on-failure` flag to continue running next step when failure occurs
|
- feat: support `--continue-on-failure` flag to continue running next step when failure occurs
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/google/uuid"
|
||||||
"github.com/olekukonko/tablewriter"
|
"github.com/olekukonko/tablewriter"
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
"github.com/prometheus/client_golang/prometheus/push"
|
"github.com/prometheus/client_golang/prometheus/push"
|
||||||
@@ -366,8 +367,9 @@ var (
|
|||||||
|
|
||||||
// NewPrometheusPusherOutput returns a PrometheusPusherOutput.
|
// NewPrometheusPusherOutput returns a PrometheusPusherOutput.
|
||||||
func NewPrometheusPusherOutput(gatewayURL, jobName string) *PrometheusPusherOutput {
|
func NewPrometheusPusherOutput(gatewayURL, jobName string) *PrometheusPusherOutput {
|
||||||
|
nodeUUID, _ := uuid.NewUUID()
|
||||||
return &PrometheusPusherOutput{
|
return &PrometheusPusherOutput{
|
||||||
pusher: push.New(gatewayURL, jobName),
|
pusher: push.New(gatewayURL, jobName).Grouping("instance", nodeUUID.String()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user