Lines Matching +full:clock +full:- +full:1000000000
47 " %s [-c #[,#..] -f] path\n"
49 " -c # Skip most tests and go straight to a high queue depth test\n"
59 " -f Only usable with continuous mode. Pin ourself to the CPUs\n"
99 mqd_t queue = -1;
120 "re-run the tests using fake mode in order to check "
136 "the no-mqueue work and mqueue work tests",
192 if (queue != -1) in shutdown()
283 * open_queue - open the global queue for testing
284 * @attr - An attr struct specifying the desired queue traits
285 * @result - An attr struct that lists the actual traits the queue has
298 if (queue == -1) in open_queue()
352 clock_gettime(clock, &start); \
355 clock_gettime(clock, &middle); \
358 clock_gettime(clock, &end); \
359 nsec = ((middle.tv_sec - start.tv_sec) * 1000000000) + \
360 (middle.tv_nsec - start.tv_nsec); \
362 if (send_total.tv_nsec >= 1000000000) { \
364 send_total.tv_nsec -= 1000000000; \
366 nsec = ((end.tv_sec - middle.tv_sec) * 1000000000) + \
367 (end.tv_nsec - middle.tv_nsec); \
369 if (recv_total.tv_nsec >= 1000000000) { \
371 recv_total.tv_nsec -= 1000000000; \
393 if (--*prio < 0) in dec_prio()
394 *prio = mq_prio_max - 1; in dec_prio()
432 clockid_t clock; in perf_test_thread() local
442 if (mq_prio_max == -1) in perf_test_thread()
444 if (pthread_getcpuclockid(cpu_threads[0], &clock) != 0) in perf_test_thread()
447 if (clock_getres(clock, &res)) in perf_test_thread()
467 nsec = ((unsigned long long)send_total.tv_sec * 1000000000 + in perf_test_thread()
472 nsec = ((unsigned long long)recv_total.tv_sec * 1000000000 + in perf_test_thread()
477 for (cur_test = test2; cur_test->desc != NULL; cur_test++) { in perf_test_thread()
478 printf("%s:\n", cur_test->desc); in perf_test_thread()
487 clock_gettime(clock, &start); in perf_test_thread()
488 for (i = 0; i < result.mq_maxmsg - 1; i++) { in perf_test_thread()
490 cur_test->func(&prio_out); in perf_test_thread()
492 clock_gettime(clock, &end); in perf_test_thread()
493 nsec = ((unsigned long long)(end.tv_sec - start.tv_sec) * in perf_test_thread()
494 1000000000) + (end.tv_nsec - start.tv_nsec); in perf_test_thread()
495 printf("done.\t\t%lld.%llds\n", nsec / 1000000000, in perf_test_thread()
496 nsec % 1000000000); in perf_test_thread()
501 cur_test->func(&prio_out); in perf_test_thread()
506 nsec = ((unsigned long long)send_total.tv_sec * 1000000000 + in perf_test_thread()
511 nsec = ((unsigned long long)recv_total.tv_sec * 1000000000 + in perf_test_thread()
516 clock_gettime(clock, &start); in perf_test_thread()
518 clock_gettime(clock, &end); in perf_test_thread()
519 nsec = ((unsigned long long)(end.tv_sec - start.tv_sec) * in perf_test_thread()
520 1000000000) + (end.tv_nsec - start.tv_nsec); in perf_test_thread()
521 printf("done.\t\t%lld.%llds\n", nsec / 1000000000, in perf_test_thread()
522 nsec % 1000000000); in perf_test_thread()
538 if (setpriority(PRIO_PROCESS, 0, -20) != 0) in increase_limits()
540 cur_nice = -20; in increase_limits()
555 if (sysconf(_SC_NPROCESSORS_ONLN) == -1) { in main()
612 * non-absolute path name, unlink will fail. So, in main()
639 cpus_to_pin[0] = cpus_online - 1; in main()
701 if (sigaction(SIGUSR1, &sa, NULL) == -1) in main()
704 if (sigaction(SIGHUP, &sa, NULL) == -1) in main()
706 if (sigaction(SIGINT, &sa, NULL) == -1) in main()
708 if (sigaction(SIGQUIT, &sa, NULL) == -1) in main()
710 if (sigaction(SIGTERM, &sa, NULL) == -1) in main()