Utils
Class ChartUtils

java.lang.Object
  extended by Utils.ChartUtils

public class ChartUtils
extends java.lang.Object

Holds all the necessary funtionality for creatin the graphs. Gnuplot is used . Files with needed values and Gnuplot scripts are created and saved so that they could be run manually at will. Gnuplot must already be installed on the system

Author:
Ioannis Kakavas, Spyridon Dossis

Constructor Summary
ChartUtils()
           
 
Method Summary
static void createControlChart(Router r)
          Creates a control chart for the router.
static void createDistributionGraph(Router r)
          Creates a distribution graph for the router.
static void createMinMaxCurve(java.util.Hashtable<java.lang.String,java.lang.Double[]> minmax, java.lang.Double maxload)
          Creates the MinMax Curve for all the routers' loads.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartUtils

public ChartUtils()
Method Detail

createControlChart

public static void createControlChart(Router r)
Creates a control chart for the router. A file holding the load values, and a gnuplot script are created. Then gnuplot is called and chart saved as a .png image

Parameters:
r - Router Object

createDistributionGraph

public static void createDistributionGraph(Router r)
Creates a distribution graph for the router. Load values are parsed and categorized in bins of values and results are saved to file. A gnuplot script is created and saved and gnuplot is then called to create the graph and save it to a .png file.

Parameters:
r - Router object

createMinMaxCurve

public static void createMinMaxCurve(java.util.Hashtable<java.lang.String,java.lang.Double[]> minmax,
                                     java.lang.Double maxload)
Creates the MinMax Curve for all the routers' loads. Min and max values of load are needed to define the area of the graph for gnuplot

Parameters:
minmax - The minimum value of load we got for all routers
maxload - The maximum value of load we got from all routers.