bbyars / mountebank

Over the wire test doubles
http://www.mbtest.org
MIT License
2k stars 262 forks source link

fix: adjust imposter metrics creation (#1) #729

Closed deividbatfish2 closed 1 year ago

deividbatfish2 commented 1 year ago

I use mountebank to run load tests, because of that, I use the imposter metrics to get feedback about the time to generate the responses. After the release 2.8.1 the metrics about imposters stop showing. The reason is, the module imposter.js started to be loaded before the method prometheus.register.clear(); to be called. I created a method to create the metrics inside the function create and an object to control if metrics already created.

fix #718

bbyars commented 1 year ago

Thanks!