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

d4rkr00t / percentile / 351 / 3
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 24 Apr 2020 07:27AM UTC
Files 1
Run time 0s
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

24 Apr 2020 07:25AM UTC coverage: 100.0%. Remained the same
351.3

push

travis-ci

d4rkr00t
feat: Support an array of percentiles

Add support for calcualting and array of percentiles in 1 pass, example:

```js
const percentile = require("percentile");
const result = percentile(
  [70, 80, 90], // calculates 70p, 80p and 90p in one pass
  [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
);
console.log(result); // [7, 8, 9]
```

It adds a little bit of overhead because, now percentile needs to
convert a percentile argument to an array and apply validation and
calculation to this array of percentiles, but overall performance is
still in a ball park of original implementation:

```
Small Array – 10 items [old] x 3,024,685 ops/sec ±0.65% (94 runs sampled)
Small Array – 10 items [new] x 2,941,058 ops/sec ±1.04% (95 runs sampled)
Fastest is Small Array – 10 items [old]

Big array 10k values [old] x 5,482 ops/sec ±0.58% (92 runs sampled)
Big array 10k values [new] x 5,381 ops/sec ±0.69% (91 runs sampled)
Fastest is Big array 10k values [old]

Big array 100k values [old] x 395 ops/sec ±1.00% (91 runs sampled)
Big array 100k values [new] x 406 ops/sec ±0.93% (88 runs sampled)
Fastest is Big array 100k values [new]
```

Fixes #101

24 of 24 branches covered (100.0%)

32 of 32 relevant lines covered (100.0%)

1519.84 hits per line

Source Files on job 351.3
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 349
  • Travis Job 351.3
  • 179a0273 on github
  • Prev Job for on master (#349.1)
  • Next Job for on master (#352.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

© 2025 Coveralls, Inc