MCPcopy Index your code
hub / github.com/koding/kite / BenchmarkPostgresGet

Function BenchmarkPostgresGet

kontrol/bench_test.go:38–50  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

36}
37
38func BenchmarkPostgresGet(b *testing.B) {
39 kon.SetStorage(NewPostgres(nil, kon.Kite.Log))
40
41 query := &protocol.KontrolQuery{
42 ID: "b9cc3baf-4f03-47d0-5a62-7de2e9f22476",
43 }
44
45 b.ResetTimer()
46
47 for i := 0; i < b.N; i++ {
48 kon.storage.Get(query)
49 }
50}
51
52func BenchmarkEtcdAdd(b *testing.B) {
53 kon.SetStorage(NewEtcd(nil, kon.Kite.Log))

Callers

nothing calls this directly

Calls 3

NewPostgresFunction · 0.85
SetStorageMethod · 0.80
GetMethod · 0.65

Tested by

no test coverage detected