serv_puts(serv_sock, buf);
serv_gets(serv_sock, buf);
- printf("\033[%d;0H\033[32m%6d\033[0m", 7+serv_sock, serv_sock-3);
-
+ int row = 10 + ((serv_sock-3) % 20);
+ int col = ((serv_sock-3) / 20) * 10;
long ops = 0;
+ printf("\033[%d;%dH\033[32m--------\033[0m", row, col);
+ fflush(stdout);
+ sleep(1);
while(1) {
- //alarm(30);
perform_random_thing(serv_sock);
- printf("\033[%d;11H\033[33m%8ld\033[0m", 7+serv_sock, ++ops);
+ printf("\033[%d;%dH\033[33m%8ld\033[0m", row, col, ++ops);
fflush(stdout);
}
}
int nthreads = 3;
fprintf(stderr, "\033[2J\033[H"
- "\033[44m\033[33m\033[1m \033[K\033[0m\n"
- "\033[44m\033[33m\033[1m Load testing utility for Citadel \033[K\033[0m\n"
- "\033[44m\033[33m\033[1m Copyright (c) 2023 by citadel.org et al. \033[K\033[0m\n"
+ "\033[44m\033[33m\033[1m \033[K\033[0m\n"
+ "\033[44m\033[33m\033[1m Load testing utility for Citadel \033[K\033[0m\n"
+ "\033[44m\033[33m\033[1m Copyright (c) 2023 by citadel.org et al. \033[K\033[0m\n"
"\033[44m\033[33m\033[1m This program is open source software. Use, duplication, or disclosure \033[K\033[0m\n"
- "\033[44m\033[33m\033[1m is subject to the terms of the GNU General Public license v3. \033[K\033[0m\n"
- "\033[44m\033[33m\033[1m \033[K\033[0m\n");
+ "\033[44m\033[33m\033[1m is subject to the terms of the GNU General Public license v3. \033[K\033[0m\n"
+ "\033[44m\033[33m\033[1m \033[K\033[0m\n");
// Parse command line
while ((a = getopt(argc, argv, "h:n:")) != EOF) {
setup_accounts(serv_sock);
close(serv_sock);
- printf("\033[8Hthread num_ops\n------ -----------");
-
for (a=0; a<(nthreads-1); ++a) {
pthread_t thread;
pthread_attr_t attr;