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

uber-go / tally / 546
91%

Build:
DEFAULT BRANCH: master
Ran 31 Mar 2020 09:08PM UTC
Jobs 5
Files 8
Run time 2min
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

pending completion
546

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)

102 of 102 new or added lines in 3 files covered. (100.0%)

1003 of 1070 relevant lines covered (93.74%)

1274.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 546.1 (GO15VENDOREXPERIMENT=1) 31 Mar 2020 09:08PM UTC 0
93.74
Travis Job 546.1
2 546.2 (GO15VENDOREXPERIMENT=1) 31 Mar 2020 09:08PM UTC 0
93.74
Travis Job 546.2
3 546.3 (GO15VENDOREXPERIMENT=1) 31 Mar 2020 09:08PM UTC 0
93.74
Travis Job 546.3
4 546.4 (GO15VENDOREXPERIMENT=1) 31 Mar 2020 09:08PM UTC 0
93.55
Travis Job 546.4
5 546.5 (GO15VENDOREXPERIMENT=1) 31 Mar 2020 09:10PM UTC 0
93.74
Travis Job 546.5
Source Files on build 546
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #546
  • 5673c5ab on github
  • Prev Build on master (#541)
  • Next Build on master (#556)
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