• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber-go / tally / 546 / 1
91%
master: 91%

Build:
DEFAULT BRANCH: master
Ran 31 Mar 2020 09:08PM UTC
Files 8
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Mar 2020 09:06PM UTC coverage: 93.738% (+0.2%) from 93.545%
GO15VENDOREXPERIMENT=1

push

travis-ci

web-flow
subscoping: Defer tag merging (#133)

This improves the performance of creating subscopes with new tags by
deferring merged map creation.

We currently create the merged map of tags first, and then calculate the
key which we use to determine if we have a cached subscope.

With this change, we calculate the key with slightly more complex logic
that inspects the unmerged maps and avoids paying the cost of merging
the maps if not needed.

To make this change, we first refactor scopeRegistry so that Scope
accesses it like a separate object.

---

I ran the benchmarks with `-count 3`.

**Before**

```
BenchmarkScopeTaggedCachedSubscopes-4             486406              2334 ns/op            1152 B/op          9 allocs/op
BenchmarkScopeTaggedCachedSubscopes-4             445890              2567 ns/op            1152 B/op          9 allocs/op
BenchmarkScopeTaggedCachedSubscopes-4             423003              2721 ns/op            1152 B/op          9 allocs/op
BenchmarkScopeTaggedNoCachedSubscopes-4           189488              6149 ns/op            2203 B/op         17 allocs/op
BenchmarkScopeTaggedNoCachedSubscopes-4           273436              6063 ns/op            2235 B/op         17 allocs/op
BenchmarkScopeTaggedNoCachedSubscopes-4           278360              5049 ns/op            2233 B/op         17 allocs/op
```

**After**

```
BenchmarkScopeTaggedCachedSubscopes-4             652670              1791 ns/op             832 B/op          8 allocs/op
BenchmarkScopeTaggedCachedSubscopes-4             669008              1953 ns/op             832 B/op          8 allocs/op
BenchmarkScopeTaggedCachedSubscopes-4             591230              1817 ns/op             832 B/op          8 allocs/op
BenchmarkScopeTaggedNoCachedSubscopes-4           234835              5876 ns/op            2269 B/op         18 allocs/op
BenchmarkScopeTaggedNoCachedSubscopes-4           315829              5058 ns/op            2237... (continued)

1003 of 1070 relevant lines covered (93.74%)

148.72 hits per line

Source Files on job 546.1 (GO15VENDOREXPERIMENT=1)
  • Tree
  • List 0
  • Changed 5
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 477
  • Travis Job 546.1
  • 5673c5ab on github
  • Prev Job for GO15VENDOREXPERIMENT=1 on master (#541.1)
  • Next Job for GO15VENDOREXPERIMENT=1 on master (#556.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc