aboutsummaryrefslogtreecommitdiffstats
path: root/metrics/runtime_gccpufraction.go
diff options
context:
space:
mode:
Diffstat (limited to 'metrics/runtime_gccpufraction.go')
-rw-r--r--metrics/runtime_gccpufraction.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/metrics/runtime_gccpufraction.go b/metrics/runtime_gccpufraction.go
new file mode 100644
index 000000000..ca12c05ba
--- /dev/null
+++ b/metrics/runtime_gccpufraction.go
@@ -0,0 +1,9 @@
+// +build go1.5
+
+package metrics
+
+import "runtime"
+
+func gcCPUFraction(memStats *runtime.MemStats) float64 {
+ return memStats.GCCPUFraction
+}