etcd/mvcc
Nikita Vetoshkin dbc7c2cf4e backend: reuse timer in run().
Benchmarks:

```
import (
	"testing"
	"time"
)

func BenchmarkTimeAfter(b *testing.B) {
	b.ReportAllocs()
	for n := 0; n < b.N; n++ {
		select {
		case <- time.After(1 * time.Millisecond):
		}
	}
}

func BenchmarkTimerReset(b *testing.B) {
	b.ReportAllocs()
	t := time.NewTimer(1 * time.Millisecond)
	for n := 0; n < b.N; n++ {
		select {
		case <- t.C:
		}
		t.Reset(1 * time.Millisecond)
	}
}
```

Running reveals that each loop results in 3 allocs:

```
BenchmarkTimeAfter-4 	    2000	   1112134 ns/op	     192 B/op	       3 allocs/op
BenchmarkTimerReset-4	    2000	   1109774 ns/op	       0 B/op	       0 allocs/op
```
2016-06-23 18:49:41 +05:00
..
backend backend: reuse timer in run(). 2016-06-23 18:49:41 +05:00
mvccpb main: add grpc-gateway support 2016-06-14 17:09:06 -07:00
doc.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
index.go mvcc: use capnslog 2016-05-20 22:31:22 -07:00
index_bench_test.go mvcc: add keyIndex benchmark test 2016-06-09 14:13:18 -07:00
index_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
key_index.go mvcc: use capnslog 2016-05-20 22:31:22 -07:00
key_index_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
kv.go *: support count in range query 2016-06-21 16:20:55 -07:00
kv_test.go *: support count in range query 2016-06-21 16:20:55 -07:00
kvstore.go *: support count in range query 2016-06-21 16:20:55 -07:00
kvstore_bench_test.go mvcc: use capnslog 2016-05-20 22:31:22 -07:00
kvstore_compaction.go mvcc: use capnslog 2016-05-20 22:31:22 -07:00
kvstore_compaction_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
kvstore_test.go *: support count in range query 2016-06-21 16:20:55 -07:00
metrics.go *: fix pending events metrics 2016-06-19 23:00:39 -07:00
revision.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
revision_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
util.go mvcc: use capnslog 2016-05-20 22:31:22 -07:00
watchable_store.go mvcc: tighten up watcher cancelation and revision handling 2016-05-27 17:19:32 -07:00
watchable_store_bench_test.go mvcc: benchmark for synced watchers 2016-05-19 23:31:27 -07:00
watchable_store_test.go mvcc: tighten up watcher cancelation and revision handling 2016-05-27 17:19:32 -07:00
watcher.go mvcc: don't cancel watcher if stream is already closed 2016-06-03 11:12:46 -07:00
watcher_bench_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00
watcher_group.go mvcc: tighten up watcher cancelation and revision handling 2016-05-27 17:19:32 -07:00
watcher_test.go mvcc: update LICENSE header 2016-05-12 20:50:33 -07:00