mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-12 10:04:14 +02:00
Add MD5 hash filter to performance tests.
This commit is contained in:
parent
92c036b966
commit
a329afd3be
@ -308,6 +308,7 @@ testRun(void)
|
||||
|
||||
// Start totals to 1ms just in case something takes 0ms to run
|
||||
uint64_t copyTotal = 1;
|
||||
uint64_t md5Total = 1;
|
||||
uint64_t sha1Total = 1;
|
||||
uint64_t sha256Total = 1;
|
||||
uint64_t gzip6Total = 1;
|
||||
@ -325,6 +326,17 @@ testRun(void)
|
||||
}
|
||||
MEM_CONTEXT_TEMP_END();
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_LOG_FMT("md5 iteration %u", idx + 1);
|
||||
|
||||
MEM_CONTEXT_TEMP_BEGIN()
|
||||
{
|
||||
BENCHMARK_BEGIN();
|
||||
BENCHMARK_FILTER_ADD(cryptoHashNew(HASH_TYPE_MD5_STR));
|
||||
BENCHMARK_END(md5Total);
|
||||
}
|
||||
MEM_CONTEXT_TEMP_END();
|
||||
|
||||
// -------------------------------------------------------------------------------------------------------------------------
|
||||
TEST_LOG_FMT("sha1 iteration %u", idx + 1);
|
||||
|
||||
@ -374,6 +386,7 @@ testRun(void)
|
||||
TEST_TITLE("results");
|
||||
|
||||
TEST_LOG_FMT("copy average: %" PRIu64 "MiB/s", blockTotal * 1000 / copyTotal / iteration);
|
||||
TEST_LOG_FMT("md5 average: %" PRIu64 "MiB/s", blockTotal * 1000 / md5Total / iteration);
|
||||
TEST_LOG_FMT("sha1 average: %" PRIu64 "MiB/s", blockTotal * 1000 / sha1Total / iteration);
|
||||
TEST_LOG_FMT("sha256 average: %" PRIu64 "MiB/s", blockTotal * 1000 / sha256Total / iteration);
|
||||
TEST_LOG_FMT("gzip -6 average: %" PRIu64 "MiB/s", blockTotal * 1000 / gzip6Total / iteration);
|
||||
|
Loading…
Reference in New Issue
Block a user