ndnsim结果分析

ndnSIM中提供了几种trace用来对仿真结果进行跟踪,生成数据文件txt

官网地址: https://ndnsim.net/current/metric.html#packet-trace-helper-example

1、L3RateTracer(官网示例文件:ndn-tree-tracers.cpp)

L3RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
跟踪NDN节点转发的兴趣/数据包的字节数和速率
生成结果文件rate-trace.txt,包含以下内容
Time    Node    FaceId    FaceDescr    Type    Packets    Kilobytes    PacketRaw    KilobytesRaw
0.5    leaf-1    1    internal://    InInterests    0    0    0    0
0.5    leaf-1    1    internal://    OutInterests    0    0    0    0
0.5    leaf-1    1    internal://    InData    0    0    0    0
0.5    leaf-1    1    internal://    OutData    0    0    0    0
0.5    leaf-1    1    internal://    InNacks    0    0    0    0
0.5    leaf-1    1    internal://    OutNacks    0    0    0    0CacheHits:“数据包”列指定缓存中满足的兴趣数

     CacheMisses:“数据包”列指定缓存中未满足的兴趣数

0.5    leaf-1    1    internal://    InSatisfiedInterests    0    0    0    0
0.5    leaf-1    1    internal://    InTimedOutInterests    0    0    0    0
0.5    leaf-1    1    internal://    OutSatisfiedInterests    1.6    0    1    0
0.5    leaf-1    1    internal://    OutTimedOutInterests    0    0    0    0

 

2、L2RateTracer(官网示例文件:ndn-simple-withl2tracer.cpp)

此跟踪器在本质上与ndn :: L3RateTracer相似,但当前仅跟踪第2层上的数据包丢弃
下图是根据官网用R语言绘制的结果图
ns3::L2RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
结果文件包含以下内容:
Time    Node    Interface    Type    Packets    Kilobytes    PacketsRaw    KilobytesRaw
1       Rtr1    combined      Drop    0          0            0             0

3、CsTracer(官网示例文件:ndn-tree-cs-tracers.cpp)

仅当使用OldContentStore结构时,此跟踪器才起作用!

通过使用ndn :: CsTracer,可以获得仿真节点上缓存命中/缓存未命中的统计信息

CsTracer::InstallAll("cs-trace.txt", Seconds(1));

结果文件包含:
Time    Node    Type    Packets    
1    leaf-1    CacheHits    0
1    leaf-1    CacheMisses    11
1    leaf-2    CacheHits    0
1    leaf-2    CacheMisses    1

Type:CacheHits: “数据包”列指定缓存中满足的兴趣数
   CacheMisses:“数据包”列指定缓存中未满足的兴趣数

Packets:该时间段内的数据包数量,其含义取决于“类型”列

4、AppDelayTracer(官网示例文件:ndn-tree-app-delay-tracer.cpp)

通过使用ndn :: AppDelayTracer,可以获取有关发出兴趣和接收相应数据包之间的延迟的数据。

AppDelayTracer::InstallAll("app-delays-trace.txt");

结果文件中包含:
Time    Node    AppId    SeqNo    Type    DelayS    DelayUS    RetxCount    HopCount
10.0058    leaf-1    0    0    LastDelay    0.0057904    5790.4     1    2
10.0058    leaf-1    0    0    FullDelay    9.00579     9.00579e+06    3    2

seqNo:兴趣数据的序列号
Type: LastDelay表示DelayS和DelayUS表示最后发送的兴趣和接收到的数据包之间的延迟
   FullDelay表示DelayS和DelayUS代表发送的第一个兴趣点和接收到的数据包之间的延迟(即,包括兴趣点重传的时间)
DelayS:延迟值,以秒为单位
DelayUS:延迟值,以微秒为单位(10 ^ -6)
RetxCount:
重发兴趣的次数(对于LastDelay始终等于1)
HopCount:检索到的数据包在从生产者应用程序或缓存返回的途中经过的网络跃点数。

请注意,与ndnSIM 1.0相比,HopCount字段的语义已更改。

剩下的工作就是将结果数据文件处理后可视化

官方使用的R语言,这里数据处理的方法都可,我习惯用python。

posted @ 2019-10-23 17:10  风云傲天  阅读(1203)  评论(0编辑  收藏  举报