forked from rcrowley/go-metrics
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for fraction of CPU time used by GC
- Loading branch information
Isaac Saldana
committed
Nov 29, 2015
1 parent
1ce93ef
commit 8f4775a
Showing
3 changed files
with
48 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build go1.5 | ||
|
||
package metrics | ||
|
||
import "runtime" | ||
|
||
func gcCPUFraction(memStats *runtime.MemStats) float64 { | ||
return memStats.GCCPUFraction | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// +build !go1.5 | ||
|
||
package metrics | ||
|
||
import "runtime" | ||
|
||
func gcCPUFraction(memStats *runtime.MemStats) float64 { | ||
return 0 | ||
} |