retryTicks
.name(name() + ".retryTicks")
.desc("Time spent waiting due to back-pressure (ticks)");
+
+ bytesRead
+ .name(name() + ".bytesRead")
+ .desc("Number of bytes read");
+
+ bytesWritten
+ .name(name() + ".bytesWritten")
+ .desc("Number of bytes written");
+
+ totalReadLatency
+ .name(name() + ".totalReadLatency")
+ .desc("Total latency of read requests");
+
+ totalWriteLatency
+ .name(name() + ".totalWriteLatency")
+ .desc("Total latency of write requests");
+
+ totalReads
+ .name(name() + ".totalReads")
+ .desc("Total num of reads");
+
+ totalWrites
+ .name(name() + ".totalWrites")
+ .desc("Total num of writes");
+
+ avgReadLatency
+ .name(name() + ".avgReadLatency")
+ .desc("Avg latency of read requests");
+ avgReadLatency = totalReadLatency / totalReads;
+
+ avgWriteLatency
+ .name(name() + ".avgWriteLatency")
+ .desc("Avg latency of write requests");
+ avgWriteLatency = totalWriteLatency / totalWrites;
+
+ readBW
+ .name(name() + ".readBW")
+ .desc("Read bandwidth in bytes/s");
+ readBW = bytesRead / simSeconds;
+
+ writeBW
+ .name(name() + ".writeBW")
+ .desc("Write bandwidth in bytes/s");
+ writeBW = bytesWritten / simSeconds;
+
}
std::shared_ptr<BaseGen>
assert(iter->second <= curTick());
+ if (pkt->isWrite()) {
+ ++totalWrites;
+ bytesWritten += pkt->req->getSize();
+ totalWriteLatency += curTick() - iter->second;
+ } else {
+ ++totalReads;
+ bytesRead += pkt->req->getSize();
+ totalReadLatency += curTick() - iter->second;
+ }
+
waitingResp.erase(iter);
delete pkt;
/** Reqs waiting for response **/
std::unordered_map<RequestPtr,Tick> waitingResp;
+ /** Count the number of bytes read. */
+ Stats::Scalar bytesRead;
+
+ /** Count the number of bytes written. */
+ Stats::Scalar bytesWritten;
+
+ /** Total num of ticks read reqs took to complete */
+ Stats::Scalar totalReadLatency;
+
+ /** Total num of ticks write reqs took to complete */
+ Stats::Scalar totalWriteLatency;
+
+ /** Count the number reads. */
+ Stats::Scalar totalReads;
+
+ /** Count the number writes. */
+ Stats::Scalar totalWrites;
+
+ /** Avg num of ticks each read req took to complete */
+ Stats::Formula avgReadLatency;
+
+ /** Avg num of ticks each write reqs took to complete */
+ Stats::Formula avgWriteLatency;
+
+ /** Read bandwidth in bytes/s */
+ Stats::Formula readBW;
+
+ /** Write bandwidth in bytes/s */
+ Stats::Formula writeBW;
+
public:
BaseTrafficGen(const BaseTrafficGenParams* p);