]> git.saurik.com Git - redis.git/commitdiff
Number of iteration of --test-memory is now 300 (several minutes per gigabyte). Memte...
authorantirez <antirez@gmail.com>
Sun, 18 Mar 2012 16:24:48 +0000 (17:24 +0100)
committerantirez <antirez@gmail.com>
Sun, 18 Mar 2012 16:25:00 +0000 (17:25 +0100)
src/memtest.c
src/redis.c

index 56d566abd18206c9fd4c64976cd2dbf791283416..18e2e6e82787ee236b9893dbfdb1ebb5b3c050b4 100644 (file)
@@ -24,11 +24,13 @@ void memtest_progress_start(char *title, int pass) {
 
     printf("\x1b[H\x1b[2J");    /* Cursor home, clear screen. */
     /* Fill with dots. */
-    for (j = 0; j < ws.ws_col*ws.ws_row; j++) printf(".");
+    for (j = 0; j < ws.ws_col*(ws.ws_row-2); j++) printf(".");
+    printf("Please keep the test running several minutes per GB of memory.\n");
+    printf("Also check http://www.memtest86.com/ and http://pyropus.ca/software/memtester/");
     printf("\x1b[H\x1b[2K");          /* Cursor home, clear current line.  */
     printf("%s [%d]\n", title, pass); /* Print title. */
     progress_printed = 0;
-    progress_full = ws.ws_col*(ws.ws_row-1);
+    progress_full = ws.ws_col*(ws.ws_row-3);
     fflush(stdout);
 }
 
index 60d45b5e6fd927b137ec979839bca418d4d0c14c..8e0b22eb999f14b3ee50115c2d677cff56368d4a 100644 (file)
@@ -2313,7 +2313,7 @@ int main(int argc, char **argv) {
             strcmp(argv[1], "-h") == 0) usage();
         if (strcmp(argv[1], "--test-memory") == 0) {
             if (argc == 3) {
-                memtest(atoi(argv[2]),10000);
+                memtest(atoi(argv[2]),300);
                 exit(0);
             } else {
                 fprintf(stderr,"Please specify the amount of memory to test in megabytes.\n");