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

dgraph-io / badger / 3577
61%
main: 61%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/actions-eb8e6b6abe
DEFAULT BRANCH: main
Ran 14 Jan 2020 02:43PM UTC
Jobs 4
Files 53
Run time 35min
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

14 Jan 2020 02:22PM UTC coverage: 69.907% (-0.03%) from 69.934%
3577

push

travis-ci

web-flow
Use fastRand instead of locked-rand in skiplist (#1173)

The math/rand package (https://golang.org/src/math/rand/rand.go) uses
a global lock to allow concurrent access to the rand object.

The PR replaces `math.Rand` with `ristretto/z.FastRand()`. `FastRand`
is much faster than `math.Rand` and `rand.New(..)` generators.

The change improves concurrent writes to skiplist by ~30%
```go
func BenchmarkWrite(b *testing.B) {
	value := newValue(123)
	l := NewSkiplist(int64((b.N + 1) * MaxNodeSize))
	defer l.DecrRef()
	b.ResetTimer()
	b.RunParallel(func(pb *testing.PB) {
		rng := rand.New(rand.NewSource(time.Now().UnixNano()))
		for pb.Next() {
			l.Put(randomKey(rng), y.ValueStruct{Value: value, Meta: 0, UserMeta: 0})
		}
	})
}
```
```
name      old time/op  new time/op  delta
Write-16   657ns ± 3%   441ns ± 1%  -32.94%  (p=0.000 n=9+10)
```

6 of 6 new or added lines in 2 files covered. (100.0%)

6904 of 9876 relevant lines covered (69.91%)

274881.29 hits per line

Jobs
ID Job ID Ran Files Coverage
1 3577.1 14 Jan 2020 02:43PM UTC 0
69.52
Travis Job 3577.1
2 3577.2 14 Jan 2020 02:58PM UTC 0
69.66
Travis Job 3577.2
3 3577.3 14 Jan 2020 02:59PM UTC 0
69.89
Travis Job 3577.3
4 3577.4 14 Jan 2020 03:18PM UTC 0
69.74
Travis Job 3577.4
Source Files on build 3577
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3577
  • 9d6512b0 on github
  • Prev Build on master (#3574)
  • Next Build on master (#3584)
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