1 /* 2 * syscall1.c 3 * 4 * Single thread getuid timing test. 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, single thread\n"); 18 printf("if using powerd, run several times\n"); 19 20 start_timing(); 21 while (stop_timing(0, NULL) == 0) { 22 for (j = 0; j < 100; ++j) 23 getuid(); 24 count += 100; 25 } 26 max = count; 27 start_timing(); 28 for (count = 0; count < max; count += 100) { 29 for (j = 0; j < 100; ++j) 30 getuid(); 31 } 32 stop_timing(count, "getuid()"); 33 return(0); 34 } 35 36