From 534fb79234665337d624c632844d6a2df787801e Mon Sep 17 00:00:00 2001 From: Julie Stalley Date: Mon, 13 Mar 2017 15:12:40 +0000 Subject: [PATCH] Change autoscaling --- README.md | 3 +++ Sources/SwiftMetricsBluemix/SwiftMetricsBluemix.swift | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 65dc052..30630c2 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,8 @@ If you supply a closure that takes either a *[pre-supplied API struct](#api-stru ### SwiftMetricsKitura(swiftMetricsInstance: SwiftMetrics) (when importing SwiftMetricsKitura) Creates a SwiftMetricsKitura instance, which will monitor Kitura HTTP metrics and emit them via the SwiftMetrics instance specified. +### SwiftMetricsBluemix(swiftMetricsInstance: SwiftMetrics) (when importing SwiftMetricsBluemix) +Creates a SwiftMetricsBluemix instance, which will send metrics to the [Auto Scale service][7] ## API Data Structures @@ -256,3 +258,4 @@ Non-release versions of this project (for example on github.com/RuntimeTools/Swi [4]: https://docs.npmjs.com/files/folders [5]: https://github.com/RuntimeTools/SwiftMetrics/issues [6]: https://github.com/RuntimeTools/SwiftMetrics +[7]: https://www.ibm.com/cloud-computing/bluemix/auto-scale diff --git a/Sources/SwiftMetricsBluemix/SwiftMetricsBluemix.swift b/Sources/SwiftMetricsBluemix/SwiftMetricsBluemix.swift index 8131599..c4263aa 100644 --- a/Sources/SwiftMetricsBluemix/SwiftMetricsBluemix.swift +++ b/Sources/SwiftMetricsBluemix/SwiftMetricsBluemix.swift @@ -58,7 +58,7 @@ fileprivate struct AverageMetrics { fileprivate var throughput : Double = 0 } -public class AutoScalar { +public class SwiftMetricsBluemix { var reportInterval: Int = 30 // the number of s to wait between report thread runs