From: Art Cancro Date: Mon, 25 Sep 2023 14:57:34 +0000 (-0400) Subject: view_mail.js: more progress on upload dialog X-Git-Tag: v995~9 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c229674219844f86c2a4a538bdfec997e624aca1 view_mail.js: more progress on upload dialog --- diff --git a/citadel/utils/loadtest.c b/citadel/utils/loadtest.c index 242d15522..34ea27b88 100644 --- a/citadel/utils/loadtest.c +++ b/citadel/utils/loadtest.c @@ -1,4 +1,4 @@ -// unfinished load testing utility for Citadel Server +// Load testing utility for Citadel Server // // Copyright (c) 1987-2023 by the citadel.org team // @@ -210,6 +210,8 @@ int nrooms = sizeof(random_rooms) / sizeof(char *); char *test_user = "Load Test User"; char test_pass[16]; + +// These are our randomized load test operations: an even mix of changing rooms, posting messages, and deleting messages. void perform_random_thing(int serv_sock) { int op = random() % 3; char buf[SIZ]; @@ -273,6 +275,7 @@ void perform_random_thing(int serv_sock) { } +// This is the main loop. We log in as the load test user, and then perform random operations until stopped. void *loadtest(void *blah) { char buf[SIZ]; int serv_sock; @@ -296,6 +299,7 @@ void *loadtest(void *blah) { serv_puts(serv_sock, buf); serv_gets(serv_sock, buf); + // Find a nice spot on the screen to show the operation count for this thread. int row = 10 + ((serv_sock-3) % 20); int col = ((serv_sock-3) / 20) * 10; long ops = 0; @@ -309,6 +313,7 @@ void *loadtest(void *blah) { } +// Create (or replace) the account used for load testing, then create the rooms in which we will load test. void setup_accounts(int serv_sock) { int i; char buf[SIZ]; @@ -367,7 +372,7 @@ int main(int argc, char **argv) { exit(errno); } - // Generate random password for load test user + // Generate a random password for load test user. No one needs this password except us. srand(time(NULL)+getpid()); for (i=0; i