mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

for i in github.com/BurntSushi/toml github.com/coreos/go-etcd/etcd github.com/coreos/go-log/log github.com/gorilla/context github.com/rcrowley/go-metrics bitbucket.org/kardianos/osext github.com/coreos/go-systemd/journal github.com/coreos/raft code.google.com/p/goprotobuf/proto ; do goven -copy -rewrite $i; done
20 lines
611 B
Go
20 lines
611 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/coreos/etcd/third_party/github.com/rcrowley/go-metrics"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
r := metrics.NewRegistry()
|
|
for i := 0; i < 10000; i++ {
|
|
r.Register(fmt.Sprintf("counter-%d", i), metrics.NewCounter())
|
|
r.Register(fmt.Sprintf("gauge-%d", i), metrics.NewGauge())
|
|
r.Register(fmt.Sprintf("histogram-uniform-%d", i), metrics.NewHistogram(metrics.NewUniformSample(1028)))
|
|
r.Register(fmt.Sprintf("histogram-exp-%d", i), metrics.NewHistogram(metrics.NewExpDecaySample(1028, 0.015)))
|
|
r.Register(fmt.Sprintf("meter-%d", i), metrics.NewMeter())
|
|
}
|
|
time.Sleep(600e9)
|
|
}
|