Package Overview

The Application Delay Tracking package is a collection of Kernel Procedures that let you track application delays during discrete event simulation. You can use these KPs to add application delay tracking to your custom process models.

Application Delay Tracking (ADT) works by tagging packets generated by a given application. This allows the application delays to be recorded as the packet moves through the network. During simulation execution, application delay tracking writes raw data to several temporary files. These files are

  • object ID file (<base_name>.0.adt.tmp)
  • application type file (<base_name>.1.adt.tmp)
  • application instance file (<base_name>.2.adt.tmp)
  • message file (<base_name>.3.adt.tmp)
  • happening file (<base_name>.4.adt.tmp)

These files are created (and the path and base names are specified) by op_apptrack_create().

When the simulation completes, Application Delay Tracking processes the temporary files to create a final file (<base_name>.adt) that the Application Segment Tracking Viewer can display.

Workflow

These are the general steps a process model should include to implement application delay tracking.

  1. Initialize application delay tracking by calling op_apptrack_create().
  2. Register the application types (such as HTTP) that will be tracked by calling op_apptrack_type_register() for each one.
  3. For each application instance to be tracked (that is, a specific application type on a specific node), call op_apptrack_instance_create() to get an ID for tracking.
  4. Each time the process model creates a packet that applies to a tracked application instance, call op_apptrack_pk_tag() to mark it as such.
  5. When the packet reaches its destination, call op_apptrack_pk_reception_record() to record the end time.
  6. To stop tracking delays for an application instance before the end of the simulation, call op_apptrack_instance_complete().
  7. At the end of the simulation, call op_apptrack_destroy() to destroy the ADT state and process the collected data into a form the Application Segment Tracking Viewer can display.

In addition to the KPs in the standard workflow, this package provides some additional KPs for special needs.

You can find out what application types (by ID) are included in a tagged packet with op_apptrack_pk_type_info_get(). To get the application type name that corresponds to an ID, use op_apptrack_type_name_get().

In the unlikely event you need to stop tracking a packet, you can untag it with op_apptrack_pk_tag_clear().

The times tracked by ADT assume that packet transmission and reception are handled in the usual way at the MAC layer. If transmission and reception are handled elsewhere (for example, if packet reception is handled in a higher layer instead of the RCVR module), you can assure that valid transmission and reception times are recorded with op_apptrack_tx_enqueue_flag(), op_apptrack_rx_processing_disable(), and op_apptrack_rx_record().

For an example implementation of application delay tracking, refer to <install_dir>\<reldir>\models\std\applications\apptrack_support.ex.c.