HEBench
hebench_report_overview_header.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_ReportHeader_H_0596d40a3cce4b108a81595c50eb286d
6 #define _HEBench_ReportHeader_H_0596d40a3cce4b108a81595c50eb286d
7 
8 #include <cstdint>
9 #include <ostream>
10 #include <string>
11 #include <string_view>
12 #include <vector>
13 
14 namespace hebench {
15 namespace ReportGen {
16 
18 {
19 public:
20  static constexpr const char *EndStateOK = "OK";
21  static constexpr const char *EndStateGeneralFailure = "Failed";
22 
24  other(0) {}
25 
26  std::string workload_name;
27  std::string end_state;
28  std::string report_file;
29  std::string category;
30  std::string data_type;
31  std::string cipher_text;
32  std::string scheme;
33  std::string security;
34  std::int64_t other;
35  std::vector<std::string> w_params;
36 
37  void parseHeader(const std::string &filename, const std::string &s_header, const std::string &s_end_state);
38 
39  // outputs header without workload parameters
40  void outputHeader(std::ostream &os, bool new_line = true);
41 
42 private:
43  static std::vector<std::string_view> extractInfoFromCSVLine(std::string_view s_row,
44  const std::string_view &s_tag,
45  std::size_t num_values);
46  static std::string extractCiphertextBitset(std::vector<std::string_view> s_indices);
47 };
48 
49 } // namespace ReportGen
50 } // namespace hebench
51 
52 #endif // defined _HEBench_ReportHeader_H_0596d40a3cce4b108a81595c50eb286d
void outputHeader(std::ostream &os, bool new_line=true)
void parseHeader(const std::string &filename, const std::string &s_header, const std::string &s_end_state)
static constexpr const char * EndStateGeneralFailure