• Home
  • Raw
  • Download

Lines Matching refs:fsc

39 void ffsb_statsc_init(ffsb_statsc_t * fsc)  in ffsb_statsc_init()  argument
41 fsc->num_buckets = 0; in ffsb_statsc_init()
42 fsc->buckets = NULL; in ffsb_statsc_init()
43 fsc->ignore_stats = 0; in ffsb_statsc_init()
46 void ffsb_statsc_addbucket(ffsb_statsc_t * fsc, uint32_t min, uint32_t max) in ffsb_statsc_addbucket() argument
49 fsc->num_buckets++; in ffsb_statsc_addbucket()
52 temp = ffsb_realloc(fsc->buckets, sizeof(struct stat_bucket) * in ffsb_statsc_addbucket()
53 fsc->num_buckets); in ffsb_statsc_addbucket()
55 fsc->buckets = temp; in ffsb_statsc_addbucket()
58 fsc->buckets[fsc->num_buckets - 1].min = min; in ffsb_statsc_addbucket()
59 fsc->buckets[fsc->num_buckets - 1].max = max; in ffsb_statsc_addbucket()
62 void ffsb_statsc_destroy(ffsb_statsc_t * fsc) in ffsb_statsc_destroy() argument
64 free(fsc->buckets); in ffsb_statsc_destroy()
67 void ffsb_statsc_ignore_sys(ffsb_statsc_t * fsc, syscall_t s) in ffsb_statsc_ignore_sys() argument
73 fsc->ignore_stats |= (1 << s); in ffsb_statsc_ignore_sys()
76 int fsc_ignore_sys(ffsb_statsc_t * fsc, syscall_t s) in fsc_ignore_sys() argument
78 return fsc->ignore_stats & (1 << s); in fsc_ignore_sys()
81 void ffsb_statsd_init(ffsb_statsd_t * fsd, ffsb_statsc_t * fsc) in ffsb_statsd_init() argument
91 fsc->num_buckets); in ffsb_statsd_init()
94 memset(fsd->buckets[i], 0, sizeof(uint32_t) * fsc->num_buckets); in ffsb_statsd_init()
96 fsd->config = fsc; in ffsb_statsd_init()
167 static void print_buckets_helper(ffsb_statsc_t * fsc, uint32_t * buckets) in print_buckets_helper() argument
170 if (fsc->num_buckets == 0) { in print_buckets_helper()
174 for (i = 0; i < fsc->num_buckets; i++) { in print_buckets_helper()
175 struct stat_bucket *sb = &fsc->buckets[i]; in print_buckets_helper()
211 ffsb_statsc_t fsc;
217 ffsb_statsc_init(&fsc, 10);
218 ffsb_statsc_setbucket(&fsc, 0, 0.0f, 50.0f);
219 ffsb_statsc_setbucket(&fsc, 1, 50.0f, 10000.0f);
220 ffsb_statsc_setbucket(&fsc, 2, 0.1f, 0.2f);
221 ffsb_statsc_setbucket(&fsc, 3, 0.0f, 50.0f);
222 ffsb_statsc_setbucket(&fsc, 4, 50.0f, 10000.0f);
223 ffsb_statsc_setbucket(&fsc, 5, 0.1f, 0.2f);
224 ffsb_statsc_setbucket(&fsc, 6, 0.0f, 50.0f);
225 ffsb_statsc_setbucket(&fsc, 7, 50.0f, 10000.0f);
226 ffsb_statsc_setbucket(&fsc, 8, 0.1f, 0.2f);
227 ffsb_statsc_setbucket(&fsc, 9, 50.0f, 10000.0f);
228 ffsb_statsd_init(&fsd, &fsc);
236 ffsb_statsc_destroy(&fsc);