You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Returns a function which restricts a value to a specified range by throwing if it is not in range:
43
+
// (Note: std::clamp() does not throw.)
44
+
autoclamp_or_throw(auto min, auto max)
45
+
{
46
+
return [=](auto& x) {
47
+
if(std::less<>{}(x, min) or std::greater<>{}(x, max)) {
48
+
throwstd::out_of_range(fmt::format("value expected between {} and {}, but got {}", min, max, x));
49
+
}
50
+
51
+
return x;
52
+
};
53
+
}
54
+
55
+
} // namespace settings
56
+
36
57
// compare shared_ptr<string>
37
58
structStringPtrCompare
38
59
{
@@ -338,8 +359,8 @@ int main(int argc, char** argv) {
338
359
339
360
// options
340
361
uint64_t io_depth = 8;
341
-
uint64_t nparser_threads = 16;
342
-
uint64_t nworker_threads = 16;
362
+
int nparser_threads = 16;
363
+
int nworker_threads = 16;
343
364
string file("input.txt");
344
365
string ceph_conf_path("./ceph.conf");
345
366
string pool("test_pool");
@@ -351,8 +372,8 @@ int main(int argc, char** argv) {
351
372
("input-files,i", po::value<vector<string>>()->multitoken(), "List of input files (output of op_scraper.py). Multiple files will be merged and sorted by time order")
352
373
("ceph-conf", po::value<string>(&ceph_conf_path)->default_value("ceph.conf"), "Path to ceph conf")
0 commit comments