Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Segaran committed Feb 7, 2020
1 parent a428dfa commit e63a74d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ describe("Duration histogram tests", () => {
});

it("combineHistogram", () => {
let firstHistogram = new DurationHistogram();
let firstHistogram = new DurationHistogram({initSize:0});
firstHistogram.incrementBucket(20);
let secondHistogram = new DurationHistogram();
secondHistogram.incrementBucket(40);
secondHistogram.incrementBucket(100, 10);

firstHistogram.combine(secondHistogram);

expect([-20, 1, -19, 1]).toEqual(firstHistogram.toArray());
expect([-20, 1, -19, 1, -59, 10]).toEqual(firstHistogram.toArray());
});

it("bucketZeroToOne", () => {
Expand Down

0 comments on commit e63a74d

Please sign in to comment.