hyperledger / caliper

A blockchain benchmark framework to measure performance of multiple blockchain solutions https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper/
Apache License 2.0
650 stars 402 forks source link

Distinguish different workers in Prometheus PushGateway #1427

Closed CaptainIRS closed 2 years ago

CaptainIRS commented 2 years ago

In this PR:

Fixes #1354

Results:

/metrics endpoint of PushGateway

image

Grafana dashboard showing metrics from two workers simultaneously

image

davidkel commented 2 years ago

We would need a stub of the method this.prometheusPushGateway.pushAdd so we can track that it is being called and passing the expected parameters. This will then give us code coverage of that line and we know that it executes and passes the correct parameters, also checks that the call is likely to succeed and not fail when executed for real.