Vonng / pg_exporter

Advanced PostgreSQL & Pgbouncer Metrics Exporter for Prometheus
https://pigsty.io
Apache License 2.0
164 stars 42 forks source link

Remove unnecessary calls for time.Now() #21

Closed japinli closed 2 years ago

japinli commented 2 years ago

In execute() function, it calls time.Now() to set scrapeDone when there is an error. However, it also set the scrapeDone in Collect(), so it's redundant to set scrapeDone in execute().

Vonng commented 2 years ago

that make sense, thanks~