Created
October 10, 2012 23:48
-
-
Save andybons/3869270 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
package metrics | |
import ( | |
"github.com/stathat/go" | |
"time" | |
) | |
func Count(name string) { | |
stathat.PostEZCountOne(name, "YOUR_EZKEY") | |
} | |
func Timed(name string, f func()) { | |
now := time.Now() | |
f() | |
stathat.PostEZValue(name, "YOUR_EZKEY", time.Since(now).Seconds()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment