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

TykTechnologies / tyk / 5046

Build:
DEFAULT BRANCH: master
Ran 06 Jun 2018 05:42PM UTC
Jobs 2
Files 104
Run time 25s
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
5046

push

travis-ci

buger
NormalisePath and RegExp optimizations (#1689)

changes for https://github.com/TykTechnologies/tyk/issues/1633

benchmark before:
```
time="May  8 14:09:43" level=info msg="Disabled feature" 
goos: darwin
goarch: amd64
pkg: github.com/TykTechnologies/tyk
BenchmarkURLReplacer-8   	  500000	     17705 ns/op	     848 B/op	      44 allocs/op
PASS
ok  	github.com/TykTechnologies/tyk	9.332s
```
benchmark after:
```
time="May  9 12:28:00" level=info msg="Disabled feature" 
goos: darwin
goarch: amd64
pkg: github.com/TykTechnologies/tyk
BenchmarkURLReplacer-8   	 3000000	      2124 ns/op	     960 B/op	       8 allocs/op
PASS
ok  	github.com/TykTechnologies/tyk	8.614s
```
NOTE: x6 throughput increase (!)

benchcmp output (vs master):
```
benchmark                  old ns/op     new ns/op     delta
BenchmarkURLReplacer-8     17705         2124          -88.00%

benchmark                  old allocs     new allocs     delta
BenchmarkURLReplacer-8     44             8              -81.82%

benchmark                  old bytes     new bytes     delta
BenchmarkURLReplacer-8     848           960           +13.21%
```

what was changed:

- if config is already available in calling part - pass config to function - reduces fight for mutex (gives ~13% improvement) 
- added new package "`github.com/TykTechnologies/tyk/regexp`" (real performance boost comes from this change) which provides the same API as standard `"regexp"` but with caching inside (not for all functions - we can extend it as we go with our optimization changes for other tickets). Also, added some tests for it, still need to figure out how to test cache hits for `Regexp`'s methods

9061 of 15585 relevant lines covered (58.14%)

1.28 hits per line

Jobs
ID Job ID Ran Files Coverage
1 5046.1 (LATEST_GO=true) 06 Jun 2018 05:42PM UTC 0
57.53
Travis Job 5046.1
2 5046.2 (LATEST_GO=true) 06 Jun 2018 05:43PM UTC 0
58.13
Travis Job 5046.2
Source Files on build 5046
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #5046
  • e887423b on github
  • Prev Build on master (#5011)
  • Next Build on master (#5047)
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