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

pions / srtp / 51
41%
master: 41%

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

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

Jobs
ID Job ID Ran Files Coverage
1 51.1 (GO111MODULE=on) 17 Feb 2019 01:49PM UTC 0
40.16
Travis Job 51.1
Source Files on build 51
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #51
  • 0e58c34c on github
  • Prev Build on optimize-write-rtp (#45)
  • Next Build on optimize-write-rtp (#67)
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