/* SPDX-License-Identifier: GPL-2.0-or-later */1/* cpufreq-bench CPUFreq microbenchmark2*3* Copyright (C) 2008 Christian Kornacker <[email protected]>4*/56/* struct that holds the required config parameters */7struct config8{9long sleep; /* sleep time in µs */10long load; /* load time in µs */11long sleep_step; /* time value which changes the12* sleep time after every round in µs */13long load_step; /* time value which changes the14* load time after every round in µs */15unsigned int cycles; /* calculation cycles with the same sleep/load time */16unsigned int rounds; /* calculation rounds with iterated sleep/load time */17unsigned int cpu; /* cpu for which the affinity is set */18char governor[15]; /* cpufreq governor */19enum sched_prio /* possible scheduler priorities */20{21SCHED_ERR = -1,22SCHED_HIGH,23SCHED_DEFAULT,24SCHED_LOW25} prio;2627unsigned int verbose; /* verbose output */28FILE *output; /* logfile */29char *output_filename; /* logfile name, must be freed at the end30if output != NULL and output != stdout*/31};3233enum sched_prio string_to_prio(const char *str);3435FILE *prepare_output(const char *dir);3637int prepare_config(const char *path, struct config *config);38struct config *prepare_default_config();39404142