Packet-level trace helpers
-
ndn::L3RateTracer
javascript:void(null)跟蹤NDN節點轉發的Interest/Data包的以字節為單位的速率和包的數量
以下示例跟蹤所有節點:
// the following should be put just before calling Simulator::Run in the scenario
L3RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
Simulator::Run();
...
輸出文件格式是制表符分隔值,第一行指定列的名稱。 有關列的說明,請參閱下表:
-
L2Tracer
這個跟蹤器在本質上類似于ndn :: L3RateTracer,但是它當前只跟蹤第2層上的數據包丟棄(例如,由于傳輸隊列溢出)。
// 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,可以獲得有關發送Interest和接收相應數據包之間的延遲的數據。
// the following should be put just before calling Simulator::Run in the scenario
AppDelayTracer::InstallAll("app-delays-trace.txt");
Simulator::Run();
...