Packet-level trace helpers
-
ndn::L3RateTracer
javascript:void(null)跟蹤NDN節(jié)點(diǎn)轉(zhuǎn)發(fā)的Interest/Data包的以字節(jié)為單位的速率和包的數(shù)量
以下示例跟蹤所有節(jié)點(diǎn):
// the following should be put just before calling Simulator::Run in the scenario
L3RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
Simulator::Run();
...
輸出文件格式是制表符分隔值,第一行指定列的名稱玫荣。 有關(guān)列的說明,請(qǐng)參閱下表:
-
L2Tracer
這個(gè)跟蹤器在本質(zhì)上類似于ndn :: L3RateTracer愕掏,但是它當(dāng)前只跟蹤第2層上的數(shù)據(jù)包丟棄(例如麻敌,由于傳輸隊(duì)列溢出)圆裕。
// the following should be put just before calling Simulator::Run in the scenario
L2RateTracer::InstallAll("drop-trace.txt", Seconds(0.5));
Simulator::Run();
...
Content store trace helper
NOTE: This tracer works ONLY when the OldContentStore structure is used!
Application-level trace helper
-
ndn::AppDelayTracer
通過使用ndn :: AppDelayTracer,可以獲得有關(guān)發(fā)送Interest和接收相應(yīng)數(shù)據(jù)包之間的延遲的數(shù)據(jù)蜓竹。
// the following should be put just before calling Simulator::Run in the scenario
AppDelayTracer::InstallAll("app-delays-trace.txt");
Simulator::Run();
...