btrfs-progs/crypto
David Sterba 55bf9b749d btrfs-progs: crypto: add time-based measurement to hash-speedtest
People are interested in measuring the hash performance on non-x86_64
architectures. Add option to do time-based measurements (in nanoseconds)
in case there's no support for clock-based measurements.

  $ ./hash-speedtest --cycles
  Block size:     4096
  Iterations:     100000
  Implementation: builtin
  Units:          cycles

      NULL-NOP: cycles:     43035633, cycles/i      430
   NULL-MEMCPY: cycles:     72478624, cycles/i      724
	CRC32C: cycles:    181712982, cycles/i     1817
	XXHASH: cycles:    136251305, cycles/i     1362
	SHA256: cycles:  10758567410, cycles/i   107585
       BLAKE2b: cycles:   2249704806, cycles/i    22497

  $ ./hash-speedtest --time
  Block size:     4096
  Iterations:     100000
  Implementation: builtin
  Units:          nsecs

      NULL-NOP:  nsecs:     12459033, nsecs/i      124
   NULL-MEMCPY:  nsecs:     20687845, nsecs/i      206
	CRC32C:  nsecs:     52648264, nsecs/i      526
	XXHASH:  nsecs:     39591766, nsecs/i      395
	SHA256:  nsecs:   3079668837, nsecs/i    30796
       BLAKE2b:  nsecs:    644766582, nsecs/i     6447

Signed-off-by: David Sterba <dsterba@suse.com>
2021-05-26 22:42:59 +02:00
..
blake2-impl.h btrfs-progs: add blake2b reference implementation 2019-11-18 19:21:05 +01:00
blake2.h btrfs-progs: add blake2b reference implementation 2019-11-18 19:21:05 +01:00
blake2b-ref.c btrfs-progs: add blake2b reference implementation 2019-11-18 19:21:05 +01:00
crc32c.c btrfs-progs: move crc32c implementation to crypto/ 2019-11-18 19:20:02 +01:00
crc32c.h btrfs-progs: move crc32c implementation to crypto/ 2019-11-18 19:20:02 +01:00
hash-speedtest.c btrfs-progs: crypto: add time-based measurement to hash-speedtest 2021-05-26 22:42:59 +02:00
hash-vectest.c btrfs-progs: crypto: add test vectors 2021-03-24 22:20:19 +01:00
hash.c btrfs-progs: build: add support for libkcapi as crypto backend 2020-06-09 22:19:07 +02:00
hash.h btrfs-progs: add blake2b support 2019-11-18 19:21:06 +01:00
sha224-256.c btrfs-progs: add sha256 as supported checksumming algorithm 2019-11-18 19:20:40 +01:00
sha-private.h btrfs-progs: move sha256 from tests to crypto/ 2019-11-18 19:20:02 +01:00
sha.h btrfs-progs: crypto: remove unused sha256 definitions 2021-03-24 22:20:19 +01:00
xxhash.c btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00
xxhash.h btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00