From 4607195fa88e1a9ca633f1780bc676be29fa0db5 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 3 Sep 2009 18:36:31 +0200 Subject: [PATCH] btape: Make zero test first (fastest) btape: tweak ouputs --- bacula/src/stored/btape.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bacula/src/stored/btape.c b/bacula/src/stored/btape.c index 24c1ccaad6..2d72da5dd0 100644 --- a/bacula/src/stored/btape.c +++ b/bacula/src/stored/btape.c @@ -381,8 +381,8 @@ static void print_total_speed() { char ec1[50]; kbs = (double)total_size / (1000 * total_time); - Pmsg2(000, _("TotalVolumeCapacity=%s. Total Write rate = %.1f KB/s\n"), - edit_uint64_with_commas(total_size, ec1), kbs); + Pmsg2(000, _("TotalVolumeCapacity=%sB. Total Write rate = %.1f KB/s\n"), + edit_uint64_with_suffix(total_size, ec1), kbs); } static void init_speed() @@ -404,8 +404,8 @@ static void print_speed(uint64_t bytes) total_size += bytes; kbs = (double)bytes / (1000 * now); - Pmsg2(000, _("VolumeCapacity=%s. Write rate = %.1f KB/s\n"), - edit_uint64_with_commas(bytes, ec1), kbs); + Pmsg2(000, _("VolumeCapacity=%sB. Write rate = %.1f KB/s\n"), + edit_uint64_with_suffix(bytes, ec1), kbs); } typedef enum { @@ -884,7 +884,7 @@ static bool speed_test_raw(fill_mode_t mode, uint64_t nb_gb, uint32_t nb) fill_buffer(mode, block->buf, block->buf_len); p = (uint32_t *)block->buf; - Pmsg3(0, _("Begin writing %i files of %s raw blocks of %u bytes.\n"), + Pmsg3(0, _("Begin writing %i files of %sB with raw blocks of %u bytes.\n"), nb, edit_uint64_with_suffix(nb_gb, ed1), block->buf_len); for (uint32_t j=0; jrewind(dcr); - Pmsg0(0, _("Test with random data.\n")); - ok(speed_test_raw(FILL_RANDOM, 1, 3)); - ok(speed_test_raw(FILL_RANDOM, 2, 3)); - ok(speed_test_raw(FILL_RANDOM, 4, 3)); - - Pmsg0(0, _("Test with zero data.\n")); + Pmsg0(0, _("Test with zero data, should give the maximum throughput.\n")); ok(speed_test_raw(FILL_ZERO, 1, 3)); ok(speed_test_raw(FILL_ZERO, 2, 3)); ok(speed_test_raw(FILL_ZERO, 4, 3)); + + Pmsg0(0, _("Test with random data, should give the minimum throughput.\n")); + ok(speed_test_raw(FILL_RANDOM, 1, 3)); + ok(speed_test_raw(FILL_RANDOM, 2, 3)); + ok(speed_test_raw(FILL_RANDOM, 4, 3)); } const int num_recs = 10000; -- 2.39.5