]> git.itanic.dy.fi Git - membench/blobdiff - membench.c
Transfer equal amount of bytes during each block
[membench] / membench.c
index 4aaa8b9745656e2726839a86b984cb6387969b7b..e99e6ea047ff2b0512e73b8497b5184d6427b4f5 100644 (file)
@@ -27,9 +27,9 @@ int main(int argc, char *argv[])
                iterations = 24;
 
        if (argc > 2)
-               count = atoi(argv[2]);
+               count = atoi(argv[2]) * 1024;
        else
-               count = 1024;
+               count = 1024 * 64;
        latcount = count / 10;
 
        printf("Doing %d runs with buffer size goin up to %dk\n",
@@ -142,6 +142,11 @@ int main(int argc, char *argv[])
        
                printf("\n");
 
+               count /= 2;
+               count = count ? count : 1;
+               latcount = count / 10;
+               latcount = latcount ? latcount : 1;
+
                free(buf);
        }
        return 0;