From f13bf5e64babf71f3d39b4b9e53c10979fc0efcf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Posp=C3=AD=C5=A1il?= Date: Sun, 15 Oct 2006 21:36:30 +0000 Subject: [PATCH] Modified to compare several scenarios: 0) registration only to bkserver (edg_wll_RegisterJobSync) 1) dual registration (edg_wll_RegisterJobProxy) 2) old (not dual) registration (edg_wll_RegisterJobProxyOld) 3) two separate registrations (edg_wll_RegisterJobSync + edg_wll_RegisterJobProxyOnly) --- org.glite.lb.client/src/perftest_jobreg.c | 113 ++++++++++++++++++++--------- org.glite.lb.client/src/perftest_jobreg.sh | 109 ++++++++++++++++++++++++---- 2 files changed, 170 insertions(+), 52 deletions(-) diff --git a/org.glite.lb.client/src/perftest_jobreg.c b/org.glite.lb.client/src/perftest_jobreg.c index 9017f38..450206a 100644 --- a/org.glite.lb.client/src/perftest_jobreg.c +++ b/org.glite.lb.client/src/perftest_jobreg.c @@ -29,9 +29,13 @@ extern int opterr,optind; static void usage(char *me) { - fprintf(stderr,"usage: %s [-m bkserver] [-x] [-n num_subjobs [-S]] [-l jdl_file] [-N num_repeat]\n" + fprintf(stderr,"usage: %s [-m bkserver] [-x scenario] [-n num_subjobs [-S]] [-l jdl_file] [-N num_repeat]\n" " -m address:port of bkserver\n" - " -x use LBProxy\n" + " -x use LBProxy\n" + " 1 use one call (RegisterJobProxy - dual registration) \n" + " 2 use one call (RegisterJobProxyOld - sequence registration) \n" + " 3 use two separate calls (RegisterJob and RegisterJobProxyOnly) \n" + " 0 (or anything else) do not register to lbproxy at all\n" " -n number of subjobs of DAG\n" " -S register subjobs\n" " -l file with JDL\n" @@ -54,8 +58,8 @@ int main(int argc, char *argv[]) opterr = 0; do { - switch (getopt(argc,argv,"xm:n:Sl:N:v")) { - case 'x': lbproxy = 1; break; + switch (getopt(argc,argv,"x:m:n:Sl:N:v")) { + case 'x': lbproxy = optarg ? atoi(optarg):1; break; case 'm': server = strdup(optarg); break; case 'n': num_subjobs = atoi(optarg); break; case 'S': if (num_subjobs>0) { reg_subjobs = 1; break; } @@ -67,6 +71,8 @@ int main(int argc, char *argv[]) } } while (!done); + if ((lbproxy > 3) || (lbproxy < 0)) lbproxy = 1; + if (!server && !lbproxy) { fprintf(stderr,"%s: either -m server or -x has to be specified\n",argv[0]); exit(1); @@ -112,30 +118,66 @@ int main(int argc, char *argv[]) gettimeofday(&start, NULL); for (i=0; i