Lines Matching defs:hist
260 int stats_hist(stats_container_t * hist, stats_container_t * data)
269 if (hist->size <= 0 || data->index < 0) {
284 width = MAX((max - min) / hist->size, 1);
285 hist->records[0].x = min;
286 for (i = 1; i < (hist->size); i++) {
287 hist->records[i].x = min + i * width;
293 b = MIN((y - min) / width, hist->size - 1);
294 hist->records[b].y++;
300 void stats_hist_print(stats_container_t * hist)
303 for (i = 0; i < hist->size; i++) {
304 x = hist->records[i].x;
305 if (i < hist->size - 1)
307 hist->records[i + 1].x, hist->records[i].y);
309 printf("[%ld,-) = %ld\n", x, hist->records[i].y);