]> git.proxmox.com Git - mirror_corosync.git/commitdiff
TEST: make cpgbench go to 1M
authorAngus Salkeld <asalkeld@redhat.com>
Fri, 21 Oct 2011 08:56:51 +0000 (19:56 +1100)
committerAngus Salkeld <asalkeld@redhat.com>
Fri, 21 Oct 2011 09:20:17 +0000 (20:20 +1100)
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
Reviewed-by: Steven Dake <sdake@redhat.com>
test/cpgbench.c

index 0a085fe209a0cc81380a72b3321352ef573b19c3..1592a3c2f31f6ff865342b35ed0bed77f3b23733 100644 (file)
@@ -102,7 +102,8 @@ static cpg_callbacks_t callbacks = {
        .cpg_confchg_fn         = cpg_bm_confchg_fn
 };
 
-static char data[500000];
+#define ONE_MEG 1048576
+static char data[ONE_MEG];
 
 static void cpg_benchmark (
        cpg_handle_t handle_in,
@@ -185,7 +186,10 @@ int main (void) {
        for (i = 0; i < 10; i++) { /* number of repetitions - up to 50k */
                cpg_benchmark (handle, size);
                signal (SIGALRM, sigalrm_handler);
-               size *= 2;
+               size *= 8;
+               if (size >= (ONE_MEG - 100)) {
+                       break;
+               }
        }
 
        res = cpg_finalize (handle);