cleaned that up a bit
authorArt Cancro <ajc@citadel.org>
Tue, 29 Aug 2023 02:08:52 +0000 (22:08 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 29 Aug 2023 02:08:52 +0000 (22:08 -0400)
citadel/utils/loadtest.c

index 25dfd9e90b7b7aafd02afd35d93c72604a534a8c..35b317f44d0d1db4d0550ab416f2b5e8af27d443 100644 (file)
@@ -302,13 +302,13 @@ void do_stuff(int serv_sock) {
        serv_puts(serv_sock, buf);
        serv_gets(serv_sock, buf);
 
-       printf("\033[%d;0H\033[33m%ld\033[0m", 7+serv_sock, serv_sock-3);
+       printf("\033[%d;0H\033[32m%ld\033[0m", 7+serv_sock, serv_sock-3);
 
        long ops = 0;
        while(1) {
                alarm(30);
                perform_random_thing(serv_sock);
-               printf("\033[%d;5H\033[33m%8ld\033[0m", 7+serv_sock, ++ops);
+               printf("\033[%d;11H\033[33m%8ld\033[0m", 7+serv_sock, ++ops);
                fflush(stdout);
        }
 }
@@ -359,6 +359,8 @@ int main(int argc, char **argv) {
                exit(errno);
        }
 
+       printf("\033[8Hthread   num_ops\n------ -----------");
+
        for (a=0; a<(nthreads-1); ++a) {
                pthread_t thread;
                pthread_attr_t attr;