SMT-RAT  24.02
Toolbox for Strategic and Parallel Satisfiability-Modulo-Theories Solving
parsing.h
Go to the documentation of this file.
1 #pragma once
2 
3 namespace benchmax {
4  inline std::size_t parse_peak_memory(const std::string& output) {
5  std::regex regexpr("Maximum resident set size \\(kbytes\\): ([0-9]+)");
6  std::smatch base_match;
7  bool match = std::regex_search(output, base_match, regexpr);
8  assert(match && base_match.size() == 2);
9  std::ssub_match base_sub_match = base_match[1];
10  std::stringstream ss(base_sub_match.str());
11  size_t result;
12  ss >> result;
13  return result;
14  }
15 }
std::size_t parse_peak_memory(const std::string &output)
Definition: parsing.h:4