Improve handling of min release asset size.
diff --git a/metrics/main.go b/metrics/main.go
index e6f8e55..5a8b4b6 100644
--- a/metrics/main.go
+++ b/metrics/main.go
@@ -25,6 +25,8 @@
sqlInstance = flag.String("sql_instance", "", "Instance name for the CloudSQL publisher.")
)
+const megaByte = 1024 * 1024
+
func handleError(metricName string, err error) {
fmt.Printf("[%s] %v", metricName, err)
}
@@ -45,7 +47,7 @@
cloudSql := publishers.CreateCloudSqlPublisher()
pipelinePerformance := collectors.CreatePipelinePerformanceCollector(bk, pipelines...)
workerAvailability := collectors.CreateWorkerAvailabilityCollector(bk)
- releaseDownloads := collectors.CreateReleaseDownloadsCollector(*ghOrg, *ghRepo, *ghApiToken)
+ releaseDownloads := collectors.CreateReleaseDownloadsCollector(*ghOrg, *ghRepo, *ghApiToken, megaByte)
srv := service.CreateService(handleError)
srv.AddMetric("pipeline_performance", 120, pipelinePerformance, cloudSql)