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

TykTechnologies / tyk / 5046 / 2

Build:
DEFAULT BRANCH: master
Ran 06 Jun 2018 05:43PM UTC
Files 104
Run time 9s
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

06 Jun 2018 05:36PM UTC coverage: 58.13% (+0.1%) from 58.007%
LATEST_GO=true

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

9059 of 15584 relevant lines covered (58.13%)

0.64 hits per line

Source Files on job 5046.2 (LATEST_GO=true)
  • Tree
  • List 0
  • Changed 31
  • Source Changed 31
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 4600
  • Travis Job 5046.2
  • e887423b on github
  • Prev Job for LATEST_GO=true on master (#5011.2)
  • Next Job for LATEST_GO=true on master (#5047.2)
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