summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-03-18 17:24:48 +0100
committerantirez <antirez@gmail.com>2012-03-18 21:59:59 +0100
commit83f0c677f84f9abd2c22120d777750ed135ebfd6 (patch)
tree6b486cf42dbdfc2a02bb1e94a34322658c5e478a
parenta7e66f80484bda69846efb88bbc04540bc4fee1f (diff)
downloadredis-83f0c677f84f9abd2c22120d777750ed135ebfd6.tar.gz
Number of iteration of --test-memory is now 300 (several minutes per gigabyte). Memtest86 and Memtester links are also displayed while running the test.
-rw-r--r--src/memtest.c6
-rw-r--r--src/redis.c2
2 files changed, 5 insertions, 3 deletions
diff --git a/src/memtest.c b/src/memtest.c
index 56d566abd..18e2e6e82 100644
--- a/src/memtest.c
+++ b/src/memtest.c
@@ -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);
}
diff --git a/src/redis.c b/src/redis.c
index 80160f2cb..73f30ff08 100644
--- a/src/redis.c
+++ b/src/redis.c
@@ -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");