etcd/pkg/idutil
lorneli 54827d47ee pkg/idutil: use count field as atomic variable
Use atomic.AddUint64 instead of mutex lock to inc count field.

Bench result:
benchmark           old ns/op     new ns/op     delta
BenchmarkNext-4     163           26.3          -83.87%
2018-04-27 00:44:45 +08:00
..
id.go pkg/idutil: use count field as atomic variable 2018-04-27 00:44:45 +08:00
id_test.go pkg/idutil: use count field as atomic variable 2018-04-27 00:44:45 +08:00