MCPcopy Create free account
hub / github.com/1a1a11a/libCacheSim / dump

Method dump

libCacheSim/traceAnalyzer/reqRate.cpp:41–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41void ReqRate::dump(const string &path_base) {
42 ofstream ofs(path_base + ".reqRate_w" + to_string(time_window_),
43 ios::out | ios::trunc);
44 ofs << "# " << path_base << "\n";
45 ofs << "# req rate - time window " << time_window_ << " second\n";
46 for (auto &n_req : req_rate_) {
47 ofs << n_req / time_window_ << ",";
48 }
49 ofs << "\n";
50
51 ofs << "# byte rate - time window " << time_window_ << " second\n";
52 for (auto &n_byte : byte_rate_) {
53 ofs << n_byte / time_window_ << ",";
54 }
55 ofs << "\n";
56
57 ofs << "# obj rate - time window " << time_window_ << " second\n";
58 for (auto &n_obj : obj_rate_) {
59 ofs << n_obj / time_window_ << ",";
60 }
61 ofs << "\n";
62
63 ofs << "# first seen obj (cold miss) rate - time window " << time_window_
64 << " second\n";
65 for (auto &n_obj : first_seen_obj_rate_) {
66 ofs << n_obj / time_window_ << ",";
67 }
68 ofs << "\n";
69
70 ofs.close();
71}
72
73}; // namespace traceAnalyzer

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected