Skip to content

Commit

Permalink
修复单位转换 (#13)
Browse files Browse the repository at this point in the history
bps 换算应为 1000 ,而不是 1024
  • Loading branch information
LeoQuote authored Nov 4, 2024
1 parent 83118d5 commit 350f0e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (e *CdnExporter) Collect(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(
e.cdnBandWidth,
prometheus.GaugeValue,
cdnBandWidthAverage/1024/1024,
cdnBandWidthAverage/1000/1000,
domain,
)
}()
Expand Down Expand Up @@ -340,7 +340,7 @@ func (e *CdnExporter) Collect(ch chan<- prometheus.Metric) {
ch <- prometheus.MustNewConstMetric(
e.cdnResourceBandWidth,
prometheus.GaugeValue,
resourceBandwidthAverage/1024/1024,
resourceBandwidthAverage/1000/1000,
domain,
)

Expand Down

0 comments on commit 350f0e9

Please # to comment.