xref: /dragonfly/test/sysperf/syscall1.c (revision 33311965)
1 /*
2  * syscall1.c
3  *
4  * $DragonFly: src/test/sysperf/syscall1.c,v 1.3 2007/05/20 23:22:17 dillon Exp $
5  */
6 
7 #include "blib.h"
8 
9 int
10 main(int ac, char **av)
11 {
12     long long count = 0;
13     long long max;
14     char c;
15     int j;
16 
17     printf("timing standard getuid() syscall\n");
18 
19     start_timing();
20     while (stop_timing(0, NULL) == 0) {
21 	for (j = 0; j < 100; ++j)
22 	    getuid();
23 	count += 100;
24     }
25     max = count;
26     start_timing();
27     for (count = 0; count < max; count += 100) {
28 	for (j = 0; j < 100; ++j)
29 	    getuid();
30     }
31     stop_timing(count, "getuid()");
32     return(0);
33 }
34 
35