Data Analysis Framework

The framework consists of a complete hierarchical structure which is organized as follows :
  • Sessions : Each session has unique interval value(wait) : which is the data collection duration.
    • Host 1 : Defined by a unique ip address . This host is from which data is collected
      • Packet 1
        • Timestamp
        • Offset
        • Precision
        • Sync Distance
        • Stratum Level
      • Packet 2
      • ....
      • ....
      • ....
      • Packet m
    • Host 2
    • .....
    • .....
    • .....
    • Host n

  • This is what the structures look like in the code :
    • // This is the structure which holds the packet information
      typedef struct data_packets packet;
      struct data_packets {
      long long int timestamp_tvsec;
      long long int timestamp_tvusec;
      long double offset;
      long double precision;
      long double syncd;
      int stratum;

      /* This is the structure which holds the data returned to us
      * from a single hosts. It has host_ip, number of packets and
      * each packet information.
      typedef struct host_data host;
      struct host_data {
      char ip[MAX_IP_LEN];
      int numpkts;
      packet *datapts;

      This contains information about each session which consists of
      * data obtained from multiple hosts. It contains the interval(wait) of
      * data collection and data from each hosts.
      typedef struct session_data session;
      struct session_data {
      int wait;
      int numhosts;
      host *hostpts;

  • In this framework we have added all mathematical formula functions like the Linear Regression function and other functions which may be needed. In the framework it is easy to add more functions and use them in the other functions.
  • Then we have discussed different methods to calculate Drift and Offset(In the design page). Each method is a separate function in the framework.
  • There are functions where we can see the variation of the Drift/Offset with Varying Data Collection Interval(as described above). There is a complete function called Generategraph() which takes in the X and Y points and labels and gives us an image to visualize the plot. This is done using 'gnuplot' library.

-- RahulKatare - 2013-09-20

This topic: Dev > WebHome > GoogleSummerOfCode > GSoC2013StartupAnalysisRahul > GSoC2013StartupAnalysisRahulDataAnalysis
Topic revision: 20 Sep 2013, RahulKatare
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Network Time Foundation's NTP Support Wiki? Send feedback