Skip to content

Commit

Permalink
Number of iteration of --test-memory is now 300 (several minutes per …
Browse files Browse the repository at this point in the history
…gigabyte). Memtest86 and Memtester links are also displayed while running the test.
  • Loading branch information
antirez committed Mar 18, 2012
1 parent a7e66f8 commit 83f0c67
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/memtest.c
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion src/redis.c
Expand Up @@ -1979,7 +1979,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");
Expand Down

0 comments on commit 83f0c67

Please sign in to comment.