MCPcopy Create free account
hub / github.com/F-Stack/f-stack / memtest_progress_start

Function memtest_progress_start

app/redis-6.2.6/src/memtest.c:63–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61size_t progress_full; /* How many chars to write to fill the progress bar. */
62
63void memtest_progress_start(char *title, int pass) {
64 int j;
65
66 printf("\x1b[H\x1b[2J"); /* Cursor home, clear screen. */
67 /* Fill with dots. */
68 for (j = 0; j < ws.ws_col*(ws.ws_row-2); j++) printf(".");
69 printf("Please keep the test running several minutes per GB of memory.\n");
70 printf("Also check http://www.memtest86.com/ and http://pyropus.ca/software/memtester/");
71 printf("\x1b[H\x1b[2K"); /* Cursor home, clear current line. */
72 printf("%s [%d]\n", title, pass); /* Print title. */
73 progress_printed = 0;
74 progress_full = (size_t)ws.ws_col*(ws.ws_row-3);
75 fflush(stdout);
76}
77
78void memtest_progress_end(void) {
79 printf("\x1b[H\x1b[2J"); /* Cursor home, clear screen. */

Callers 2

memtest_compare_timesFunction · 0.85
memtest_testFunction · 0.85

Calls 1

printfFunction · 0.50

Tested by

no test coverage detected