Ran
|
Files
16
|
Run time
1s
|
Badge
Embed ▾
README BADGES
|
push
travis-ci
micro-optimizations for segment.GetOperationKeyVal() Profiling showed that segment.GetOperationKeyVal was in the top 5 profile funcs. Before this change... $ go test -bench=GetOp BenchmarkGetOperationKeyVal-8 200000000 7.19 ns/op ok github.com/couchbase/moss 2.459s After the micro optimizations... $ go test -bench=GetOp BenchmarkGetOperationKeyVal-8 200000000 6.96 ns/op ok github.com/couchbase/moss 2.381s The original profile (from bleve-blast)... $ go tool pprof http://localhost:5555/debug/pprof/profile Please wait... (30s) Saved profile in /Users/steveyen/pprof/pprof.localhost:5555.samples.cpu.003.pb.gz Entering interactive mode (type "help" for commands) (pprof) top 20 80.36s of 111.28s total (72.21%) Dropped 209 nodes (cum <= 0.56s) Showing top 20 nodes out of 143 (cum >= 1.15s) flat flat% sum% cum cum% 17.97s 16.15% 16.15% 17.97s 16.15% runtime.cmpbody 9.33s 8.38% 24.53% 9.33s 8.38% runtime.usleep 8.11s 7.29% 31.82% 8.11s 7.29% github.com/couchbase/moss.(*segment).GetOperationKeyVal 6.68s 6.00% 37.82% 7.50s 6.74% github.com/blevesearch/segment.segmentWords 6.61s 5.94% 43.76% 6.61s 5.94% runtime.memmove Change-Id: Ie0359f59b Reviewed-on: http://review.couchbase.org/64632 Reviewed-by: Marty Schoch <marty.schoch@gmail.com> Tested-by: Steve Yen <steve.yen@gmail.com>
1743 of 2072 relevant lines covered (84.12%)
7475.01 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|