Lines Matching refs:histo

20     final Histogram histo = new Histogram(16000, (short) 2, 100);  in test_percentile_empty_histogram()  local
21 assertEquals(0, histo.percentile(1)); in test_percentile_empty_histogram()
22 assertEquals(0, histo.percentile(50)); in test_percentile_empty_histogram()
23 assertEquals(0, histo.percentile(99)); in test_percentile_empty_histogram()
27 final Histogram histo = new Histogram(16, (short) 1, 5); in test_16Max_1Interval_5Cutoff() local
28 assertEquals(10, histo.buckets()); in test_16Max_1Interval_5Cutoff()
30 histo.add(4); in test_16Max_1Interval_5Cutoff()
31 assertBucketEquals(histo, 4, 1); in test_16Max_1Interval_5Cutoff()
33 histo.add(5); in test_16Max_1Interval_5Cutoff()
34 assertBucketEquals(histo, 5, 1); in test_16Max_1Interval_5Cutoff()
36 histo.add(5); in test_16Max_1Interval_5Cutoff()
37 assertBucketEquals(histo, 5, 2); in test_16Max_1Interval_5Cutoff()
39 histo.add(0); in test_16Max_1Interval_5Cutoff()
40 assertBucketEquals(histo, 0, 1); in test_16Max_1Interval_5Cutoff()
42 histo.add(42); in test_16Max_1Interval_5Cutoff()
43 assertBucketEquals(histo, 9, 1); in test_16Max_1Interval_5Cutoff()
45 histo.add(6); in test_16Max_1Interval_5Cutoff()
46 assertBucketEquals(histo, 5, 3); in test_16Max_1Interval_5Cutoff()
48 histo.add(9); in test_16Max_1Interval_5Cutoff()
49 assertBucketEquals(histo, 7, 1); in test_16Max_1Interval_5Cutoff()
51 histo.add(10); in test_16Max_1Interval_5Cutoff()
52 assertBucketEquals(histo, 7, 2); in test_16Max_1Interval_5Cutoff()
54 assertBucketEquals(histo, 0, 1); in test_16Max_1Interval_5Cutoff()
55 assertBucketEquals(histo, 1, 0); in test_16Max_1Interval_5Cutoff()
56 assertBucketEquals(histo, 2, 0); in test_16Max_1Interval_5Cutoff()
57 assertBucketEquals(histo, 3, 0); in test_16Max_1Interval_5Cutoff()
58 assertBucketEquals(histo, 4, 1); in test_16Max_1Interval_5Cutoff()
59 assertBucketEquals(histo, 5, 3); in test_16Max_1Interval_5Cutoff()
60 assertBucketEquals(histo, 6, 0); in test_16Max_1Interval_5Cutoff()
61 assertBucketEquals(histo, 7, 2); in test_16Max_1Interval_5Cutoff()
62 assertBucketEquals(histo, 8, 0); in test_16Max_1Interval_5Cutoff()
63 assertBucketEquals(histo, 9, 1); in test_16Max_1Interval_5Cutoff()
67 final Histogram histo = new Histogram(16, (short) 2, 5); in test_16Max_2Interval_5Cutoff() local
68 assertEquals(6, histo.buckets()); in test_16Max_2Interval_5Cutoff()
70 histo.add(4); in test_16Max_2Interval_5Cutoff()
71 assertBucketEquals(histo, 2, 1); in test_16Max_2Interval_5Cutoff()
73 histo.add(6); in test_16Max_2Interval_5Cutoff()
74 assertBucketEquals(histo, 2, 2); in test_16Max_2Interval_5Cutoff()
76 histo.add(7); in test_16Max_2Interval_5Cutoff()
77 assertBucketEquals(histo, 2, 3); in test_16Max_2Interval_5Cutoff()
79 histo.add(0); in test_16Max_2Interval_5Cutoff()
80 assertBucketEquals(histo, 0, 1); in test_16Max_2Interval_5Cutoff()
82 histo.add(42); in test_16Max_2Interval_5Cutoff()
83 assertBucketEquals(histo, 5, 1); in test_16Max_2Interval_5Cutoff()
85 histo.add(8); in test_16Max_2Interval_5Cutoff()
86 assertBucketEquals(histo, 3, 1); in test_16Max_2Interval_5Cutoff()
88 histo.add(9); in test_16Max_2Interval_5Cutoff()
89 assertBucketEquals(histo, 3, 2); in test_16Max_2Interval_5Cutoff()
91 histo.add(10); in test_16Max_2Interval_5Cutoff()
92 assertBucketEquals(histo, 3, 3); in test_16Max_2Interval_5Cutoff()
94 histo.add(11); in test_16Max_2Interval_5Cutoff()
95 assertBucketEquals(histo, 3, 4); in test_16Max_2Interval_5Cutoff()
97 histo.add(12); in test_16Max_2Interval_5Cutoff()
98 assertBucketEquals(histo, 5, 1); in test_16Max_2Interval_5Cutoff()
100 assertBucketEquals(histo, 0, 1); in test_16Max_2Interval_5Cutoff()
101 assertBucketEquals(histo, 1, 0); in test_16Max_2Interval_5Cutoff()
102 assertBucketEquals(histo, 2, 3); in test_16Max_2Interval_5Cutoff()
103 assertBucketEquals(histo, 3, 4); in test_16Max_2Interval_5Cutoff()
104 assertBucketEquals(histo, 4, 1); in test_16Max_2Interval_5Cutoff()
105 assertBucketEquals(histo, 5, 1); in test_16Max_2Interval_5Cutoff()
109 final Histogram histo = new Histogram(160, (short) 20, 50); in test_160Max_20Interval_50Cutoff() local
110 assertEquals(6, histo.buckets()); in test_160Max_20Interval_50Cutoff()
112 histo.add(0); in test_160Max_20Interval_50Cutoff()
113 assertBucketEquals(histo, 0, 1); in test_160Max_20Interval_50Cutoff()
115 histo.add(40); in test_160Max_20Interval_50Cutoff()
116 assertBucketEquals(histo, 2, 1); in test_160Max_20Interval_50Cutoff()
118 histo.add(50); in test_160Max_20Interval_50Cutoff()
119 assertBucketEquals(histo, 2, 2); in test_160Max_20Interval_50Cutoff()
121 histo.add(60); in test_160Max_20Interval_50Cutoff()
122 assertBucketEquals(histo, 2, 3); in test_160Max_20Interval_50Cutoff()
124 histo.add(71); in test_160Max_20Interval_50Cutoff()
125 assertBucketEquals(histo, 2, 4); in test_160Max_20Interval_50Cutoff()
127 histo.add(72); in test_160Max_20Interval_50Cutoff()
128 assertBucketEquals(histo, 3, 1); in test_160Max_20Interval_50Cutoff()
130 histo.add(103); in test_160Max_20Interval_50Cutoff()
131 assertBucketEquals(histo, 3, 2); in test_160Max_20Interval_50Cutoff()
133 histo.add(104); in test_160Max_20Interval_50Cutoff()
134 assertBucketEquals(histo, 4, 1); in test_160Max_20Interval_50Cutoff()
136 histo.add(130); in test_160Max_20Interval_50Cutoff()
137 assertBucketEquals(histo, 4, 2); in test_160Max_20Interval_50Cutoff()
139 histo.add(160); in test_160Max_20Interval_50Cutoff()
140 assertBucketEquals(histo, 4, 3); in test_160Max_20Interval_50Cutoff()
142 histo.add(167); in test_160Max_20Interval_50Cutoff()
143 assertBucketEquals(histo, 4, 4); in test_160Max_20Interval_50Cutoff()
145 histo.add(168); in test_160Max_20Interval_50Cutoff()
146 assertBucketEquals(histo, 5, 1); in test_160Max_20Interval_50Cutoff()
148 histo.add(420); in test_160Max_20Interval_50Cutoff()
149 assertBucketEquals(histo, 5, 2); in test_160Max_20Interval_50Cutoff()
151 assertBucketEquals(histo, 0, 1); in test_160Max_20Interval_50Cutoff()
152 assertBucketEquals(histo, 1, 0); in test_160Max_20Interval_50Cutoff()
153 assertBucketEquals(histo, 2, 4); in test_160Max_20Interval_50Cutoff()
154 assertBucketEquals(histo, 3, 2); in test_160Max_20Interval_50Cutoff()
155 assertBucketEquals(histo, 4, 4); in test_160Max_20Interval_50Cutoff()
156 assertBucketEquals(histo, 5, 2); in test_160Max_20Interval_50Cutoff()
159 static void assertBucketEquals(final Histogram histo, in assertBucketEquals() argument
161 int actual = histo.valueInBucket(bucket); in assertBucketEquals()
164 final int nbuckets = histo.buckets(); in assertBucketEquals()
166 histo.printAsciiBucket(buf, i); in assertBucketEquals()
177 static void printHisto(final Histogram histo) { in printHisto() argument
179 histo.printAscii(buf); in printHisto()