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

pions / srtp / 51 / 1
41%
master: 41%

Build:
Build:
LAST BUILD BRANCH: optimize-new-ctr
DEFAULT BRANCH: master
Ran 17 Feb 2019 01:49PM UTC
Files 10
Run time 1s
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

17 Feb 2019 01:46PM UTC coverage: 40.16%. Remained the same
GO111MODULE=on

push

travis-ci

kixelated
Optimize WriteRTP

The previous code would Marshal the header allocating (header) bytes.
Then call append with the payload allocating payload bytes and copying
(header) bytes. Then later EncryptRTP will append the auth tag,
potentially allocating (header + payload + 10) bytes and copying
(header + payload) bytes.

This code avoids the extra allocation/copy by allocating the correct
size upfront. It also utilizes a reusable buffer between marshal calls.
This significantly reduces the allocations and work needed by the GC.

```
name                 old time/op    new time/op    delta
WriteRTP-8             9.73µs ± 2%    9.33µs ± 2%   -4.11%

name                 old alloc/op   new alloc/op   delta
WriteRTP-8             3.17kB ± 0%    1.10kB ± 0%  -65.15%

name                 old allocs/op  new allocs/op  delta
WriteRTP-8               13.0 ± 0%      10.0 ± 0%  -23.08%
```

302 of 752 relevant lines covered (40.16%)

10.78 hits per line

Source Files on job 51.1 (GO111MODULE=on)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 43
  • Travis Job 51.1
  • 0e58c34c on github
  • Prev Job for GO111MODULE=on on optimize-write-rtp (#45.1)
  • Next Job for GO111MODULE=on on optimize-write-rtp (#67.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