1 /* 2 * syscall1.c 3 * 4 * $DragonFly: src/test/sysperf/syscall1.c,v 1.1 2003/08/12 02:29:44 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 int j; 15 16 printf("timing standard getuid() syscall\n"); 17 18 start_timing(); 19 while (stop_timing(0, NULL) == 0) { 20 for (j = 0; j < 100; ++j) 21 getuid(); 22 count += 100; 23 } 24 max = count; 25 start_timing(); 26 for (count = 0; count < max; count += 100) { 27 for (j = 0; j < 100; ++j) 28 getuid(); 29 } 30 stop_timing(count, "getuid()"); 31 return(0); 32 } 33 34