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

pions / webrtc / 2629 / 1

Build:
Build:
LAST BUILD BRANCH: rtpdump
DEFAULT BRANCH: master
Ran 22 Mar 2019 08:17PM UTC
Files 61
Run time 3s
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

22 Mar 2019 08:12PM UTC coverage: 81.331% (+0.08%) from 81.252%
GO111MODULE=on

push

travis-ci

kixelated
Optimize ice.Agent.getBestPair()

This function should be trivial but profiles show it taking 3-5% of my
application's CPU time. The problem is the constant creation of a
channel for message passing. This function is called by srtp.WriteRTP
for each packet, so it adds up.

My fix was to create a `runInner` function that utilizies a mutex. I
wanted to convert all `run` functions to `runInner` but the code
occasionally deadlocks in unit tests. The package is definitely a
candidate for a rewrite.

```
name           old time/op    new time/op    delta
GetBestPair-8     915ns ± 3%      80ns ± 4%  -91.23%  (p=0.008 n=5+5)

name           old alloc/op   new alloc/op   delta
GetBestPair-8      128B ± 0%       16B ± 0%  -87.50%  (p=0.008 n=5+5)

name           old allocs/op  new allocs/op  delta
GetBestPair-8      3.00 ± 0%      1.00 ± 0%  -66.67%  (p=0.008 n=5+5)
```

4082 of 5019 relevant lines covered (81.33%)

54.08 hits per line

Source Files on job 2629.1 (GO111MODULE=on)
  • Tree
  • List 0
  • Changed 26
  • Source Changed 15
  • Coverage Changed 26
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 2130
  • Travis Job 2629.1
  • c50df7c4 on github
  • Prev Job for GO111MODULE=on on run-inline (#2612.1)
  • Next Job for GO111MODULE=on on run-inline (#2631.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