diff options
Diffstat (limited to 'apps/plugins/test_disk.c')
-rw-r--r-- | apps/plugins/test_disk.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/apps/plugins/test_disk.c b/apps/plugins/test_disk.c index 332cc1cb08..ac29f18093 100644 --- a/apps/plugins/test_disk.c +++ b/apps/plugins/test_disk.c | |||
@@ -369,6 +369,31 @@ static bool test_speed(void) | |||
369 | rb->snprintf(text_buf, sizeof(text_buf), "Dirscan: %d files/s", n / TEST_TIME); | 369 | rb->snprintf(text_buf, sizeof(text_buf), "Dirscan: %d files/s", n / TEST_TIME); |
370 | log_text(text_buf, true); | 370 | log_text(text_buf, true); |
371 | 371 | ||
372 | dir = NULL; | ||
373 | entry = NULL; | ||
374 | /* Directory scan speed 2 */ | ||
375 | time = *rb->current_tick + TEST_TIME*HZ; | ||
376 | for (n = 0; TIME_BEFORE(*rb->current_tick, time); n++) | ||
377 | { | ||
378 | if (entry == NULL) | ||
379 | { | ||
380 | if (dir != NULL) | ||
381 | rb->closedir(dir); | ||
382 | dir = rb->opendir(testbasedir); | ||
383 | if (dir == NULL) | ||
384 | { | ||
385 | rb->splash(HZ, "opendir() failed."); | ||
386 | goto error; | ||
387 | } | ||
388 | } | ||
389 | else | ||
390 | (void) rb->dir_get_info(dir, entry); | ||
391 | entry = rb->readdir(dir); | ||
392 | } | ||
393 | rb->closedir(dir); | ||
394 | rb->snprintf(text_buf, sizeof(text_buf), "Dirscan w info: %d files/s", n / TEST_TIME); | ||
395 | log_text(text_buf, true); | ||
396 | |||
372 | /* File delete speed */ | 397 | /* File delete speed */ |
373 | time = *rb->current_tick; | 398 | time = *rb->current_tick; |
374 | for (i = 0; i < last_file; i++) | 399 | for (i = 0; i < last_file; i++) |