[sr-dev] [kamailio/kamailio] dispatcher: latency fix stdev calculation (#1236)

Julien Chavanton notifications at github.com
Fri Sep 15 20:06:53 CEST 2017


#### Pre-Submission Checklist
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, ...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)

#### Description
This PR to fix a calculation error on the latency standard deviation

test with random values from 1-30
```
total[1726000000]value[3] count[2097152] std[8.654594] avg[15.541001] est[14.098082]
total[1727000000]value[2] count[2097152] std[8.654230] avg[15.542887] est[16.070623]
total[1728000000]value[2] count[2097152] std[8.655254] avg[15.546928] est[13.154167]
```
test with random values 1-500
```
total[1056000000]value[373] count[2097152] std[144.397552] avg[249.993790] est[297.913574]
total[1057000000]value[118] count[2097152] std[144.369400] avg[250.121262] est[222.419662]
total[1058000000]value[431] count[2097152] std[144.314056] avg[250.138077] est[295.765625]
```

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/1236

-- Commit Summary --

  * dispatcher: latency fix stdev calculation

-- File Changes --

    M src/modules/dispatcher/dispatch.c (29)
    M src/modules/dispatcher/dispatch.h (2)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1236.patch
https://github.com/kamailio/kamailio/pull/1236.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1236
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170915/056babc2/attachment-0001.html>


More information about the sr-dev mailing list