Lines Matching full:env
16 struct env env = { variable
28 if (level == LIBBPF_DEBUG && !env.verbose) in libbpf_print_fn()
74 hits_per_prod = hits_per_sec / env.producer_cnt; in hits_drops_report_progress()
152 hits_mean, hits_stddev, hits_mean / env.producer_cnt); in hits_drops_report_final()
164 hits_per_prod = hits_per_sec / env.producer_cnt; in ops_report_progress()
188 hits_mean, hits_stddev, hits_mean / env.producer_cnt); in ops_report_final()
189 printf("latency %8.3lf ns/op\n", 1000.0 / hits_mean * env.producer_cnt); in ops_report_final()
310 env.verbose = true; in parse_arg()
313 env.list = true; in parse_arg()
316 env.duration_sec = strtol(arg, NULL, 10); in parse_arg()
317 if (env.duration_sec <= 0) { in parse_arg()
323 env.warmup_sec = strtol(arg, NULL, 10); in parse_arg()
324 if (env.warmup_sec <= 0) { in parse_arg()
330 env.producer_cnt = strtol(arg, NULL, 10); in parse_arg()
331 if (env.producer_cnt < 0) { in parse_arg()
337 env.consumer_cnt = strtol(arg, NULL, 10); in parse_arg()
338 if (env.consumer_cnt < 0) { in parse_arg()
344 env.affinity = true; in parse_arg()
347 env.quiet = true; in parse_arg()
350 env.affinity = true; in parse_arg()
351 if (parse_num_list(arg, &env.prod_cpus.cpus, in parse_arg()
352 &env.prod_cpus.cpus_len)) { in parse_arg()
358 env.affinity = true; in parse_arg()
359 if (parse_num_list(arg, &env.cons_cpus.cpus, in parse_arg()
360 &env.cons_cpus.cpus_len)) { in parse_arg()
371 env.bench_name = strdup(arg); in parse_arg()
479 return cpu_set->next_cpu++ % env.nr_cpus; in next_cpu()
618 if (!env.bench_name) { in find_benchmark()
623 if (strcmp(benchs[i]->name, env.bench_name) == 0) { in find_benchmark()
629 fprintf(stderr, "benchmark '%s' not found\n", env.bench_name); in find_benchmark()
638 if (!env.quiet) in setup_benchmark()
641 state.producers = calloc(env.producer_cnt, sizeof(*state.producers)); in setup_benchmark()
642 state.consumers = calloc(env.consumer_cnt, sizeof(*state.consumers)); in setup_benchmark()
643 state.results = calloc(env.duration_sec + env.warmup_sec + 2, in setup_benchmark()
653 for (i = 0; i < env.consumer_cnt; i++) { in setup_benchmark()
665 if (env.affinity) in setup_benchmark()
667 next_cpu(&env.cons_cpus)); in setup_benchmark()
673 if (!env.prod_cpus.cpus) in setup_benchmark()
674 env.prod_cpus.next_cpu = env.cons_cpus.next_cpu; in setup_benchmark()
676 for (i = 0; i < env.producer_cnt; i++) { in setup_benchmark()
688 if (env.affinity) in setup_benchmark()
690 next_cpu(&env.prod_cpus)); in setup_benchmark()
693 if (!env.quiet) in setup_benchmark()
709 if (iter == env.duration_sec + env.warmup_sec) { in collect_measurements()
718 env.nr_cpus = get_nprocs(); in main()
721 if (env.list) { in main()
744 bench->report_final(state.results + env.warmup_sec, in main()
745 state.res_cnt - env.warmup_sec); in main()