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

Method turn_on_stream_dump

libCacheSim/traceAnalyzer/popularityDecay.cpp:11–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9using namespace std;
10
11void PopularityDecay::turn_on_stream_dump(string &path_base) {
12#ifdef USE_REQ_METRIC
13 stream_dump_req_ofs.open(
14 path_base + ".popularityDecay_w" + to_string(time_window_) + "_req",
15 ios::out | ios::trunc);
16 stream_dump_req_ofs << "# " << path_base << "\n";
17 stream_dump_req_ofs
18 << "# req_cnt for new object in prev N windows (time window "
19 << time_window_ << ")\n";
20#endif
21
22 stream_dump_obj_ofs.open(
23 path_base + ".popularityDecay_w" + to_string(time_window_) + "_obj",
24 ios::out | ios::trunc);
25 stream_dump_obj_ofs << "# " << path_base << "\n";
26 stream_dump_obj_ofs
27 << "# obj_cnt for new object in prev N windows (time window "
28 << time_window_ << ")\n";
29}
30
31void PopularityDecay::add_req(const request_t *req) {
32 if (unlikely(next_window_ts_ == -1)) {

Callers

nothing calls this directly

Calls 1

to_stringFunction · 0.85

Tested by

no test coverage detected