Esempio n. 1
0
void histogram_clear(struct histogram *h) {

	uint64_t key;
	struct box_count *box;

	itable_firstkey(h->buckets);
	while(itable_nextkey(h->buckets, &key, (void **) &box)) {
		free(box);
	}

	h->total_count = 0;
	h->max_value   = 0;
	h->min_value   = 0;
	h->mode        = 0;

	itable_clear(h->buckets);
}
Esempio n. 2
0
void itable_delete(struct itable *h)
{
	itable_clear(h);
	free(h->buckets);
	free(h);
}