Lines Matching refs:env

16 struct env env = {
27 if (level == LIBBPF_DEBUG && !env.verbose)
59 hits_per_prod = hits_per_sec / env.producer_cnt;
93 hits_mean, hits_stddev, hits_mean / env.producer_cnt);
146 env.verbose = true;
149 env.list = true;
152 env.duration_sec = strtol(arg, NULL, 10);
153 if (env.duration_sec <= 0) {
159 env.warmup_sec = strtol(arg, NULL, 10);
160 if (env.warmup_sec <= 0) {
166 env.producer_cnt = strtol(arg, NULL, 10);
167 if (env.producer_cnt <= 0) {
173 env.consumer_cnt = strtol(arg, NULL, 10);
174 if (env.consumer_cnt <= 0) {
180 env.affinity = true;
183 env.affinity = true;
184 if (parse_num_list(arg, &env.prod_cpus.cpus,
185 &env.prod_cpus.cpus_len)) {
191 env.affinity = true;
192 if (parse_num_list(arg, &env.cons_cpus.cpus,
193 &env.cons_cpus.cpus_len)) {
204 env.bench_name = strdup(arg);
222 if (!env.list && !env.bench_name) {
352 if (!env.bench_name) {
358 if (strcmp(benchs[i]->name, env.bench_name) == 0) {
364 fprintf(stderr, "benchmark '%s' not found\n", env.bench_name);
370 state.producers = calloc(env.producer_cnt, sizeof(*state.producers));
371 state.consumers = calloc(env.consumer_cnt, sizeof(*state.consumers));
372 state.results = calloc(env.duration_sec + env.warmup_sec + 2,
382 for (i = 0; i < env.consumer_cnt; i++) {
390 if (env.affinity)
392 next_cpu(&env.cons_cpus));
398 if (!env.prod_cpus.cpus)
399 env.prod_cpus.next_cpu = env.cons_cpus.next_cpu;
401 for (i = 0; i < env.producer_cnt; i++) {
409 if (env.affinity)
411 next_cpu(&env.prod_cpus));
429 if (iter == env.duration_sec + env.warmup_sec) {
440 if (env.list) {
460 bench->report_final(state.results + env.warmup_sec,
461 state.res_cnt - env.warmup_sec);