void usage()
{
printf("usage: ./bench\n");
printf("Options:\n");
printf(" -l, --load=\t\tinitial load time in us\n");
printf(" -s, --sleep=\t\tinitial sleep time in us\n");
printf(" -x, --load-step=\ttime to be added to load time, in us\n");
printf(" -y, --sleep-step=\ttime to be added to sleep time, in us\n");
printf(" -c, --cpu=\t\t\tCPU Nr. to use, starting at 0\n");
printf(" -p, --prio=\t\t\tscheduler priority, HIGH, LOW or DEFAULT\n");
printf(" -g, --governor=\t\tcpufreq governor to test\n");
printf(" -n, --cycles=\t\t\tload/sleep cycles\n");
printf(" -r, --rounds\t\t\tload/sleep rounds\n");
printf(" -f, --file=\t\tconfig file to use\n");
printf(" -o, --output=\t\t\toutput path. Filename will be OUTPUTPATH/benchmark_TIMESTAMP.log\n");
printf(" -v, --verbose\t\t\t\tverbose output on/off\n");
printf(" -h, --help\t\t\t\tPrint this help screen\n"); exit(1);
}
/******************************************************************* main
*******************************************************************/
int main(int argc, char **argv)
{ int c; int option_index = 0; struct config *config = NULL;
config = prepare_default_config();
if (config == NULL) return EXIT_FAILURE;
while (1) {
c = getopt_long (argc, argv, "hg:o:s:l:vc:p:f:n:r:x:y:",
long_options, &option_index); if (c == -1) break;
switch (c) { case'o': if (config->output != NULL)
fclose(config->output);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.