blob: 09d8bc6b7db4f1f8cc9cd92f43e2752dc9e5ce65 [file] [log] [blame]
Alexander Afanasyevb1314b12012-11-21 18:23:42 -08001
2Obtaining metrics
3=================
4
5To obtain simulation results, you would need to connect to one or more `trace sources <doxygen/group___trace_source_list.html>`_ provided by ndnSIM classes.
6
Alexander Afanasyevf4a03592012-12-10 16:12:34 -08007It is also possible to use existing trace helpers, which collects and aggregates requested statistical information in text files.
8
Alexander Afanasyev59314802012-11-26 14:56:04 -08009.. _trace classes:
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080010
Alexander Afanasyevf4a03592012-12-10 16:12:34 -080011Packet-level trace helpers
12--------------------------
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080013
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080014- :ndnsim:`ndn::L3RateTracer`
15
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -080016 Tracing the rate in bytes and in number of packets of Interest/Data packets forwarded by an NDN node
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080017
18 The following example enables tracing on all simulation nodes:
19
20 .. code-block:: c++
21
22 // the following should be put just before calling Simulator::Run in the scenario
23
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080024 L3RateTracer::InstallAll("rate-trace.txt", Seconds(1.0));
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -080025
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080026 Simulator::Run();
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -080027
Alexander Afanasyev59314802012-11-26 14:56:04 -080028 ...
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080029
Alexander Afanasyev45977412014-03-11 13:21:46 -070030 Output file format is tab-separated values, with first row specifying names of the columns. Refer to the following table for the description of the columns:
31
32 +------------------+---------------------------------------------------------------------+
33 | Column | Description |
34 +==================+=====================================================================+
35 | ``Time`` | simulation time |
36 +------------------+---------------------------------------------------------------------+
37 | ``Node`` | node id, globally unique |
38 +------------------+---------------------------------------------------------------------+
39 | ``FaceId`` | interface ID (-1 for combined metric) |
40 +------------------+---------------------------------------------------------------------+
41 | ``Type`` | Type of measurements: |
42 | | |
43 | | - ``InInterests`` measurements of incoming Interests |
44 | | - ``OutInterests`` measurements of outgoing Interests |
Alexander Afanasyev45977412014-03-11 13:21:46 -070045 | | - ``InData`` measurements of incoming Data |
46 | | - ``OutData`` measurements of outgoing Data |
Spyridon Mastorakisacd5e1a2016-12-07 14:34:25 -080047 | | - ``InNacks`` measurements of outgoing NACKs |
48 | | - ``OutNacks`` measurements of outgoing NACKs |
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080049 | | - ``SatisfiedInterests`` measurements of satisfied Interests |
50 | | (totals for all faces) |
51 | | - ``TimedOutInterests`` measurements of timed out Interests |
52 | | (totals for all faces) |
Alexander Afanasyev45977412014-03-11 13:21:46 -070053 | | - ``InSatisfiedInterests`` measurements of incoming satisfied |
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080054 | | Interests (per incoming face) |
Alexander Afanasyev45977412014-03-11 13:21:46 -070055 | | - ``InTimedOutInterests`` measurements of incoming timed out |
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080056 | | Interests (per incoming face) |
Alexander Afanasyev45977412014-03-11 13:21:46 -070057 | | - ``OutSatisfiedInterests`` measurements of outgoing satisfied |
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080058 | | Interests (per outgoing face) |
Alexander Afanasyev45977412014-03-11 13:21:46 -070059 | | - ``OutTimedOutInterests`` measurements of outgoing satisfied |
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080060 | | Interests (per outgoing face) |
Alexander Afanasyev45977412014-03-11 13:21:46 -070061 +------------------+---------------------------------------------------------------------+
62 | ``Packets`` | estimated rate (EWMA average) of packets within the last averaging |
63 | | period (number of packets/s). |
64 +------------------+---------------------------------------------------------------------+
65 | ``Kilobytes`` | estimated rate (EWMA average) within last averaging |
66 | | period (kilobytes/s) |
67 +------------------+---------------------------------------------------------------------+
68 | ``PacketsRaw`` | absolute number of packets within last averaging period |
69 | | (number of packets). |
70 +------------------+---------------------------------------------------------------------+
71 | ``KilobytesRaw`` | absolute number of kilobytes transferred within the last averaging |
72 | | period (number of packets). |
73 +------------------+---------------------------------------------------------------------+
74
Alexander Afanasyev27370c52013-03-12 13:54:08 -070075- :ndnsim:`L2Tracer`
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -070076
Alexander Afanasyev3fe94dc2013-08-09 17:12:12 -070077 This tracer is similar in spirit to :ndnsim:`ndn::L3RateTracer`, but it currently traces only packet drop on layer 2 (e.g.,
78 due to transmission queue overflow).
Alexander Afanasyev27370c52013-03-12 13:54:08 -070079
Alexander Afanasyev3fe94dc2013-08-09 17:12:12 -070080 The following example enables tracing on all simulation nodes:
Alexander Afanasyev27370c52013-03-12 13:54:08 -070081
82 .. code-block:: c++
83
Alexander Afanasyev27370c52013-03-12 13:54:08 -070084 // the following should be put just before calling Simulator::Run in the scenario
85
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080086 L2RateTracer::InstallAll("drop-trace.txt", Seconds(0.5));
Alexander Afanasyev27370c52013-03-12 13:54:08 -070087
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -080088 Simulator::Run();
Alexander Afanasyev27370c52013-03-12 13:54:08 -070089
90 ...
Alexander Afanasyevb1314b12012-11-21 18:23:42 -080091
Alexander Afanasyev45977412014-03-11 13:21:46 -070092 Output file format is tab-separated values, with first row specifying names of the columns. Refer to the following table for the description of the columns:
93
94 +------------------+---------------------------------------------------------------------+
95 | Column | Description |
96 +==================+=====================================================================+
97 | ``Time`` | simulation time |
98 +------------------+---------------------------------------------------------------------+
99 | ``Node`` | node id, globally unique |
100 +------------------+---------------------------------------------------------------------+
101 | ``Interface`` | interface name (currently only "combined") |
102 +------------------+---------------------------------------------------------------------+
103 | ``Type`` | Type of measurements: |
104 | | |
105 | | - ``Drop`` measurements of dropped packets |
106 +------------------+---------------------------------------------------------------------+
107 | ``Packets`` | estimated rate (EWMA average) of packets within the last averaging |
108 | | period (number of packets/s). |
109 +------------------+---------------------------------------------------------------------+
110 | ``Kilobytes`` | estimated rate (EWMA average) within last averaging |
111 | | period (kilobytes/s) |
112 +------------------+---------------------------------------------------------------------+
113 | ``PacketsRaw`` | absolute number of packets within last averaging period |
114 | | (number of packets). |
115 +------------------+---------------------------------------------------------------------+
116 | ``KilobytesRaw`` | absolute number of kilobytes transferred within the last averaging |
117 | | period (number of packets). |
118 +------------------+---------------------------------------------------------------------+
119
Alexander Afanasyevb1314b12012-11-21 18:23:42 -0800120.. note::
121
122 A number of other tracers are available in ``plugins/tracers-broken`` folder, but they do not yet work with the current code.
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800123 Eventually, we will port most of them to the current code, but it is not our main priority at the moment and would really appreciate help with writing new tracers and porting the old ones.
Alexander Afanasyevb1314b12012-11-21 18:23:42 -0800124
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800125.. _packet trace helper example:
Alexander Afanasyevb1314b12012-11-21 18:23:42 -0800126
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800127Example of packet-level trace helpers
128+++++++++++++++++++++++++++++++++++++
Alexander Afanasyev59314802012-11-26 14:56:04 -0800129
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800130This example (``ndn-tree-tracers.cpp``) demonstrates basic usage of :ref:`trace classes`.
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800131
132In this scenario we will use a tree-like topology, where consumers are installed on leaf nodes and producer is in the root of the tree:
133
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -0700134.. sidebar:: Topology
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800135
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -0700136 .. aafig::
137 :aspect: 60
138 :scale: 100
139
140 /--------\ /--------\ /--------\ /--------\
141 |"leaf-1"| |"leaf-2"| |"leaf-3"| |"leaf-4"|
142 \--------/ \--------/ \--------/ \--------/
143 ^ ^ ^ ^
144 | | | |
145 \ / \ /
146 \ / \ / 10Mbps / 1ms
147 \ / \ /
148 | | | |
149 v v v v
150 /-------\ /-------\
151 |"rtr-1"| |"rtr-2"|
152 \-------/ \-------/
153 ^ ^
154 | |
155 \ / 10 Mpbs / 1ms
156 +--------\ /--------+
157 | |
158 v v
159 /--------\
160 | "root" |
161 \--------/
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800162
163The corresponding topology file (``topo-tree.txt``):
164
165.. literalinclude:: ../../examples/topologies/topo-tree.txt
166 :language: bash
167 :linenos:
168 :lines: 1-2,27-
169
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800170Example simulation (``ndn-tree-tracers.cpp``) scenario that utilizes trace helpers:
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800171
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800172.. literalinclude:: ../../examples/ndn-tree-tracers.cpp
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800173 :language: c++
174 :linenos:
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800175 :lines: 20-27,60-
176 :emphasize-lines: 58
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800177
178To run this scenario, use the following command::
179
180 ./waf --run=ndn-tree-tracers
181
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800182The successful run will create ``rate-trace.txt`` files in the current directly, which can be analyzed manually or used as input to some graph/stats packages.
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800183
Xinyu Mafc8956c2019-04-08 23:17:52 -0700184.. sidebar:: Graph build using the `R script <https://www.r-project.org/>`_
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800185
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -0700186 .. image:: _static/root-rates.png
187 :alt: Interest/Data packet rates at the root node
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800188
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800189.. literalinclude:: ../../examples/graphs/rate-graph.R
190 :language: r
191 :linenos:
192
Xinyu Mafc8956c2019-04-08 23:17:52 -0700193For more information about R and ggplot2, please refer to `R language manual <https://cran.r-project.org/manuals.html>`_ and `ggplot2 module manual <https://docs.ggplot2.org/current/>`_.
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800194
195 ::
196
197 Rscript src/ndnSIM/examples/graphs/rate-graph.R
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800198
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700199.. _Example of packet drop tracer (L2Tracer):
200
201Example of packet drop tracer (L2Tracer)
202----------------------------------------
203
Alexander Afanasyevfc9d9e12013-08-10 14:17:49 -0700204.. sidebar:: Topology
205
206 .. image:: _static/topo-tree-25-node.png
207 :alt: 25-node tree topology
208 :width: 550px
209
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800210This example (``ndn-tree-with-l2tracer.cpp``) demonstrates basic usage of :ref:`trace classes`.
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700211
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700212The corresponding topology file (``topo-tree-25-node.txt``):
213
214.. literalinclude:: ../../examples/topologies/topo-tree-25-node.txt
215 :language: bash
216 :linenos:
217 :lines: 2-
218
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800219Example simulation (``ndn-tree-with-l2tracer.cpp``) scenario that utilizes trace helpers:
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700220
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800221.. literalinclude:: ../../examples/ndn-tree-with-l2tracer.cpp
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700222 :language: c++
223 :linenos:
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800224 :lines: 20-
225 :emphasize-lines: 16,134
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700226
227To run this scenario, use the following command::
228
229 ./waf --run=ndn-tree-with-l2tracer
230
231The successful run will create ``drop-trace.txt`` file in the current directly, which can be analyzed manually or used as input to some graph/stats packages.
232
Xinyu Mafc8956c2019-04-08 23:17:52 -0700233For example, the following `R script <https://www.r-project.org/>`_ will build a number of nice graphs:
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700234
235.. literalinclude:: ../../examples/graphs/drop-graph.R
236 :language: r
237 :linenos:
238
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800239Run R script::
240
241 Rscript src/ndnSIM/examples/graphs/drop-graph.R
242
Alexander Afanasyev27370c52013-03-12 13:54:08 -0700243.. image:: _static/l2-rate-tracer.png
244 :alt: Packet drop rates on routers
245
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800246.. _cs trace helper:
247
248Content store trace helper
249--------------------------
250
Spyridon Mastorakisa879e022017-10-16 17:12:14 -0700251NOTE: This tracer works ONLY when the OldContentStore structure is used!
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800252
Alexander Afanasyevb1d6b032013-01-18 14:11:11 -0800253- :ndnsim:`ndn::CsTracer`
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800254
Alexander Afanasyevb1d6b032013-01-18 14:11:11 -0800255 With the use of :ndnsim:`ndn::CsTracer` it is possible to obtain statistics of cache hits/cache misses on simulation nodes.
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800256
257 The following code enables content store tracing:
258
259 .. code-block:: c++
260
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800261 // the following should be put just before calling Simulator::Run in the scenario
262
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800263 CsTracer::InstallAll("cs-trace.txt", Seconds(1));
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800264
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800265 Simulator::Run();
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800266
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800267 ...
268
Alexander Afanasyev02bf7772016-08-04 13:58:05 -0700269 Output file format is tab-separated values, with first row specifying names of the columns. Refer to the following table for the description of the columns:
270
271 +------------------+----------------------------------------------------------------------+
272 | Column | Description |
273 +==================+======================================================================+
274 | ``Time`` | simulation time |
275 +------------------+----------------------------------------------------------------------+
276 | ``Node`` | node id, globally unique |
277 +------------------+----------------------------------------------------------------------+
278 | ``Type`` | Type of counter for the time period. Possible values are: |
279 | | |
280 | | - ``CacheHits``: the ``Packets`` column specifies the number of |
281 | | Interests that were satisfied from the cache |
282 | | - ``CacheMisses``: the ``Packets`` column specifies the number of |
283 | | Interests that were not satisfied from the cache |
284 +------------------+----------------------------------------------------------------------+
285 | ``Packets`` | The number of packets for the time period, meaning depends on |
286 | | ``Type`` column |
287 +------------------+----------------------------------------------------------------------+
288
289
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800290.. - Tracing lifetime of content store entries
291
292.. Evaluate lifetime of the content store entries can be accomplished using modified version of the content stores.
293.. In particular,
294
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800295.. _cs trace helper example:
296
297Example of content store trace helper
298+++++++++++++++++++++++++++++++++++++
299
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800300This example (``ndn-tree-cs-tracers.cpp``) demonstrates basic usage of content store tracer.
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800301
302In this scenario we will use the same tree-like topology as in :ref:`previous example <packet trace helper example>`, where consumers are installed on leaf nodes and producer is in the root of the tree.
303The main difference is that each client request data from the same namespace: /root/1, /root/2, ... Another small difference is that in this scenario we start our application not at the same time, but 10 ms apart.
304
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800305Example simulation (``ndn-tree-cs-tracers.cpp``) scenario that utilizes trace helpers:
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800306
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800307.. literalinclude:: ../../examples/ndn-tree-cs-tracers.cpp
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800308 :language: c++
309 :linenos:
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800310 :lines: 20-27,60-
311 :emphasize-lines: 61
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800312
313
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800314To run this scenario, use the following command::
Alexander Afanasyevf4a03592012-12-10 16:12:34 -0800315
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800316 ./waf --run=ndn-tree-cs-tracers
317
318The successful run will create ``cs-trace.txt``, which similarly to trace file from the :ref:`tracing example <packet trace helper example>` can be analyzed manually or used as input to some graph/stats packages.
319
320
321Application-level trace helper
322------------------------------
323
324- :ndnsim:`ndn::AppDelayTracer`
325
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800326 With the use of :ndnsim:`ndn::AppDelayTracer` it is possible to obtain data about for delays between issuing Interest and receiving corresponding Data packet.
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800327
328 The following code enables application-level Interest-Data delay tracing:
329
330 .. code-block:: c++
331
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800332 // the following should be put just before calling Simulator::Run in the scenario
333
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800334 AppDelayTracer::InstallAll("app-delays-trace.txt");
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800335
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800336 Simulator::Run();
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800337
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800338 ...
339
Alexander Afanasyev29dfb982013-01-18 20:04:15 -0800340 Output file format is tab-separated values, with first row specifying names of the columns. Refer to the following table for the description of the columns:
341
342 +-----------------+---------------------------------------------------------------------+
343 | Column | Description |
344 +=================+=====================================================================+
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800345 | ``Time`` | simulation time when SeqNo was receivied |
346 +-----------------+---------------------------------------------------------------------+
Alexander Afanasyev29dfb982013-01-18 20:04:15 -0800347 | ``Node`` | node id, global unique |
348 +-----------------+---------------------------------------------------------------------+
349 | ``AppId`` | app id, local unique on the node, not global |
350 +-----------------+---------------------------------------------------------------------+
351 | ``SeqNo`` | seq number of the Interest-Data |
352 +-----------------+---------------------------------------------------------------------+
353 | ``Type`` | Type of delay: |
354 | | |
355 | | - ``LastDelay`` means that ``DelayS`` and ``DelayUS`` represent |
356 | | delay between last Interest sent and Data packet received |
357 | | - ``FullDelay`` means that ``DelayS`` and ``DelayUS`` represent |
358 | | delay between first Interest sent and Data packet received |
359 | | (i.e., includes time of Interest retransmissions) |
360 +-----------------+---------------------------------------------------------------------+
361 | ``DelayS`` | delay value, specified in seconds |
362 +-----------------+---------------------------------------------------------------------+
363 | ``DelayUS`` | delay value, specified in microseconds (10^-6) |
364 +-----------------+---------------------------------------------------------------------+
Alexander Afanasyev400aae12013-01-19 13:27:52 -0800365 | ``RetxCount`` | number of Interest retransmissions (for LastDelay always equal to 1)|
366 +-----------------+---------------------------------------------------------------------+
Alexander Afanasyev18d8bc92015-08-13 18:26:40 -0700367 | ``HopCount`` | the number of network hops that the retrieved Data packet traveled |
368 | | on the way back from producer application or cache. |
369 | | |
Spyridon Mastorakisacd5e1a2016-12-07 14:34:25 -0800370 | | Note that the semantics of the ``HopCount`` field have changed |
371 | | compared to ndnSIM 1.0. |
Alexander Afanasyev1a0fff62013-01-19 14:29:51 -0800372 +-----------------+---------------------------------------------------------------------+
Alexander Afanasyev29dfb982013-01-18 20:04:15 -0800373
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800374.. _app delay trace helper example:
375
376Example of application-level trace helper
377+++++++++++++++++++++++++++++++++++++++++
378
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800379This example (``ndn-tree-app-delay-tracer.cpp``) demonstrates basic usage of application-level Interest-Data delay tracer.
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800380
Alexander Afanasyevfc8425c2013-01-31 13:33:49 -0800381In this scenario we will use the same tree-like topology as in :ref:`packet trace helper example <packet trace helper example>`, where consumers are installed on leaf nodes and producer is in the root of the tree and clients request data from the same namespace: /root/1, /root/2, ...
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800382
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800383Example simulation (``ndn-tree-app-delay-tracer.cpp``) scenario that utilizes trace helpers:
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800384
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800385.. literalinclude:: ../../examples/ndn-tree-app-delay-tracer.cpp
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800386 :language: c++
387 :linenos:
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800388 :lines: 20-27,60-
389 :emphasize-lines: 60
Alexander Afanasyevdb64ff12013-01-18 16:37:31 -0800390
391To run this scenario, use the following command::
392
393 ./waf --run=ndn-tree-app-delay-tracer
394
Spyridon Mastorakis460f57c2014-12-17 00:44:14 -0800395The successful run will create ``app-delays-trace.txt``, which similarly to trace file from the
396:ref:`packet trace helper example <packet trace helper example>` can be analyzed manually or used as
397input to some graph/stats packages.