Home | History | Annotate | Download | only in util

Lines Matching refs:buckets

78 		hist->buckets[i].lower = last;
80 hist->buckets[i].upper = last;
81 hist->buckets[i].count = 0;
92 hist->buckets = (struct th_buck*)calloc(hist->num,
94 if(!hist->buckets) {
98 /* setup the buckets */
107 free(hist->buckets);
115 hist->buckets[i].count = 0;
122 if(timeval_smaller(tv, &hist->buckets[i].upper)) {
123 hist->buckets[i].count++;
128 hist->buckets[hist->num-1].count++;
136 if(hist->buckets[i].count != 0) {
138 (int)hist->buckets[i].lower.tv_sec,
139 (int)hist->buckets[i].lower.tv_usec,
140 (int)hist->buckets[i].upper.tv_sec,
141 (int)hist->buckets[i].upper.tv_usec,
142 (unsigned)hist->buckets[i].count);
159 if(hist->buckets[i].count != 0) {
161 (int)hist->buckets[i].lower.tv_sec,
162 (int)hist->buckets[i].lower.tv_usec,
163 (int)hist->buckets[i].upper.tv_sec,
164 (int)hist->buckets[i].upper.tv_usec,
165 (unsigned)hist->buckets[i].count);
177 res += hist->buckets[i].count;
197 passed+(double)hist->buckets[i].count < lookfor) {
198 passed += (double)hist->buckets[i++].count;
202 low = (double)hist->buckets[i].lower.tv_sec +
203 (double)hist->buckets[i].lower.tv_usec/1000000.;
204 up = (double)hist->buckets[i].upper.tv_sec +
205 (double)hist->buckets[i].upper.tv_usec/1000000.;
207 res = (lookfor - passed)*(up-low)/((double)hist->buckets[i].count);
219 array[i] = (long long)hist->buckets[i].count;
230 hist->buckets[i].count = (size_t)array[i];