bhDisplay.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * CSV Display module for the hash benchmark program
  3. * Part of the xxHash project
  4. * Copyright (C) 2019-2020 Yann Collet
  5. *
  6. * GPL v2 License
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License along
  19. * with this program; if not, write to the Free Software Foundation, Inc.,
  20. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  21. *
  22. * You can contact the author at:
  23. * - xxHash homepage: https://www.xxhash.com
  24. * - xxHash source repository: https://github.com/Cyan4973/xxHash
  25. */
  26. #ifndef BH_DISPLAY_H_192088098
  27. #define BH_DISPLAY_H_192088098
  28. #if defined (__cplusplus)
  29. extern "C" {
  30. #endif
  31. /* === Dependencies === */
  32. #include "benchfn.h" /* BMK_benchFn_t */
  33. /* === Declarations === */
  34. typedef struct {
  35. const char* name;
  36. BMK_benchFn_t hash;
  37. } Bench_Entry;
  38. void bench_largeInput(Bench_Entry const* hashDescTable, int nbHashes, int sizeLogMin, int sizeLogMax);
  39. void bench_throughput_smallInputs(Bench_Entry const* hashDescTable, int nbHashes, size_t sizeMin, size_t sizeMax);
  40. void bench_throughput_randomInputLength(Bench_Entry const* hashDescTable, int nbHashes, size_t sizeMin, size_t sizeMax);
  41. void bench_latency_smallInputs(Bench_Entry const* hashDescTable, int nbHashes, size_t sizeMin, size_t sizeMax);
  42. void bench_latency_randomInputLength(Bench_Entry const* hashDescTable, int nbHashes, size_t sizeMin, size_t sizeMax);
  43. #if defined (__cplusplus)
  44. }
  45. #endif
  46. #endif /* BH_DISPLAY_H_192088098 */