HEBench
hebench_benchmark_description.h
Go to the documentation of this file.
1 
2 // Copyright (C) 2021 Intel Corporation
3 // SPDX-License-Identifier: Apache-2.0
4 
5 #ifndef _HEBench_Harness_BenchmarkDescription_H_0596d40a3cce4b108a81595c50eb286d
6 #define _HEBench_Harness_BenchmarkDescription_H_0596d40a3cce4b108a81595c50eb286d
7 
8 #include <cstdint>
9 #include <cstring>
10 #include <functional>
11 #include <memory>
12 #include <ratio>
13 #include <string>
14 #include <unordered_map>
15 #include <vector>
16 
18 
19 namespace hebench {
20 namespace TestHarness {
21 
22 class Engine;
23 
24 namespace BenchmarkDescription {
25 
26 class Backend
27 {
28 private:
29  struct Internal
30  {
31  std::size_t m_index;
34  std::size_t m_operation_params_count;
35  };
36  Internal m_backend_description;
37 
38 public:
40 
44  const std::size_t &index;
57  std::size_t &operation_params_count;
58 
59  Backend() :
60  Backend(true)
61  {
62  }
63  Backend(const Backend &src) :
64  Backend(false)
65  {
66  m_backend_description = src.m_backend_description;
67  }
68  virtual ~Backend() {}
69  Backend &operator=(const Backend &src)
70  {
71  if (&src != this)
72  {
73  this->m_backend_description = src.m_backend_description;
74  } // end if
75  return *this;
76  }
77 
78 private:
79  Backend(bool init) :
80  m_backend_description(),
81  index(m_backend_description.m_index),
82  handle(m_backend_description.m_handle),
83  descriptor(m_backend_description.m_descriptor),
84  operation_params_count(m_backend_description.m_operation_params_count)
85  {
86  if (init)
87  std::memset(&m_backend_description, 0, sizeof(m_backend_description));
88  }
89 };
90 
107 {
108 public:
112  b_single_path_report(false)
113  {
114  }
115 
140  std::string dataset_filename;
147  std::vector<std::uint64_t> default_sample_sizes;
151  std::vector<hebench::APIBridge::WorkloadParam> w_params;
156 };
157 
159 {
160 public:
164  std::int64_t workload;
168  std::string workload_name;
172  std::string data_type;
176  std::string category;
180  std::string cipher_flags;
184  std::string security;
188  std::string scheme;
192  std::string other;
197  std::string header;
202  std::string path;
203 };
204 
205 } // namespace BenchmarkDescription
206 } // namespace TestHarness
207 } // namespace hebench
208 
209 #endif // defined _HEBench_Harness_BenchmarkDescription_H_0596d40a3cce4b108a81595c50eb286d
const hebench::APIBridge::BenchmarkDescriptor & descriptor
Benchmark backend descriptor, as retrieved by backend, corresponding to the registration handle h_des...
std::size_t & operation_params_count
Number of operation parameters for the specified workload.
const hebench::APIBridge::Handle & handle
Handle to the benchmark description as registered by backend.
const std::size_t & index
Index of the benchmark as registered by backend.
std::uint64_t fallback_default_sample_size
Default sample size to be used if a specific size is not specified in the default_sample_sizes collec...
std::vector< std::uint64_t > default_sample_sizes
Default sample size for each operation parameter.
std::vector< hebench::APIBridge::WorkloadParam > w_params
Set of arguments for workload parameters.
std::string dataset_filename
File containing data for the benchmark. If empty string, benchmarks that can auto generate the datase...
std::uint64_t default_min_test_time_ms
Default minimum test time in milliseconds.
bool b_single_path_report
Defines if the workload report will be created in a single-level directory.
Defines a benchmark test.
Definition: types.h:527
Structure to contain flexible data.
Definition: types.h:552
std::string other
Other value used to uniquely identify benchmark implementations.
std::string scheme
Human-readable friendly name of the benchmark scheme.
std::string cipher_flags
Human-readable friendly name of the benchmark cipher parameters.
std::int64_t workload
Workload ID as given by hebench::APIBridge::Workload.
std::string workload_name
Human-readable friendly name of the benchmark workload.
std::string path
A string uniquely representing the benchmark descriptor that can be used as a relative directory path...
std::string category
Human-readable friendly name of the benchmark category.
std::string header
CSV formatted header for this benchmark. This will be the header pre-pended to the report containing ...
std::string data_type
Human-readable friendly name of the benchmark input/output data type.
std::string security
Human-readable friendly name of the benchmark security.