de.cau.cs.kieler.kwebs
Class Statistics

java.lang.Object
  extended by de.cau.cs.kieler.kwebs.Statistics

public class Statistics
extends Object

Class for holding measured statistical data about a layout process. The measurement is a shared process between server and client since parts of the layout process can only measured at one of each side. This class provides higher order methods for accessing the statistical data which is derived from the underlying measurements.

Rating red

Field Summary
static IProperty<String> STATISTICS
          The statistics property.
static String STATISTICS_ID
          Identifier for the statistics property.
 
Constructor Summary
Statistics()
           
 
Method Summary
 void fromString(String string)
          Parses statistical data from a string representation.
 int getBytes()
          Returns the length of the serial notation of the model of which the layout has been calculated.
 int getEdges()
          Returns the number of edges of the model which the layout has been calculated for.
 int getElementCount()
          The number of elements in the model which the layout was calculated for.
 int getLabels()
          Returns the number of labels of the model which the layout has been calculated for.
 double getLayoutPart()
          Returns the percentual part of the layout process responsible solely for the layout process.
 double getLayoutSpeed()
          Returns the speed of the layout process in graph elements per second.
 double getLocalSupplementalPart()
          Returns the percentual part of the layout process responsible for local supplementary operations.
 double getNetworkPart()
          Returns the percentual part of the layout process responsible for network transfer.
 int getNodes()
          Returns the number of nodes of the model which the layout has been calculated for.
 int getPorts()
          Returns the number of ports of the model which the layout has been calculated for.
 double getRemoteSupplementalPart()
          Returns the percentual part of the layout process responsible for remote supplementary operations.
 double getSupplementalPart()
          Returns the percentual part of the layout process responsible for local and remote supplementary operations.
 double getTimeLayout()
          Returns the time the layout took solely in nanoseconds.
 double getTimeLocalSupplemental()
          Returns the time the local supplementary operations took in nanoseconds.
 double getTimeNetwork()
          Returns the time the network transfer took in nanoseconds.
 double getTimeRemoteSupplemental()
          Returns the time the remote supplementary operations took in nanoseconds.
 double getTimeTotal()
          Returns the total time the layout took in nanoseconds.
 double getTotalSpeed()
          Returns the speed of the layout process in graph elements per second.
 boolean isCompression()
          Returns whether the serial notation was in compressed form or not.
 void setBytes(int bytes)
          Sets the length of the serial notation of the model of which the layout has been calculated.
 void setCompression(boolean compression)
          Sets whether the serial notation was in compressed form or not.
 void setEdges(int edges)
          Sets the number of edges of the model which the layout has been calculated for.
 void setLabels(int labels)
          Sets the number of edges of the model which the layout has been calculated for.
 void setNodes(int nodes)
          Sets the number of edges of the model which the layout has been calculated for.
 void setPorts(int ports)
          Sets the number of ports of the model which the layout has been calculated for.
 void setTimeLayout(double timeLayout)
          Sets the total time the layout took solely in nanoseconds.
 void setTimeLocalSupplemental(double timeLocalSupplemental)
          Sets the time the local supplementary operations took in nanoseconds.
 void setTimeNetwork(double timeNetwork)
          Sets the time the network transfer took in nanoseconds.
 void setTimeRemoteSupplemental(double timeRemoteSupplemental)
          Sets the time the remote supplementary operations took in nanoseconds.
 void setTimeTotal(double timeTotal)
          Sets the total time the layout took in nanoseconds.
 String toString()
          Returns a string representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATISTICS_ID

public static final String STATISTICS_ID
Identifier for the statistics property.

See Also:
Constant Field Values

STATISTICS

public static final IProperty<String> STATISTICS
The statistics property.

Constructor Detail

Statistics

public Statistics()
Method Detail

getBytes

public int getBytes()
Returns the length of the serial notation of the model of which the layout has been calculated.

Returns:
the length of the serial notation of the model of which the layout has been calculated

setBytes

public void setBytes(int bytes)
Sets the length of the serial notation of the model of which the layout has been calculated.

Parameters:
bytes - the length of the serial notation of the model of which the layout has been calculated.

isCompression

public boolean isCompression()
Returns whether the serial notation was in compressed form or not.

Returns:
whether the serial notation was in compressed form or not

setCompression

public void setCompression(boolean compression)
Sets whether the serial notation was in compressed form or not.

Parameters:
compression - whether the serial notation was in compressed form or not

getEdges

public int getEdges()
Returns the number of edges of the model which the layout has been calculated for.

Returns:
the number of edges of the model which the layout has been calculated for

setEdges

public void setEdges(int edges)
Sets the number of edges of the model which the layout has been calculated for.

Parameters:
edges - the number of edges of the model which the layout has been calculated for.

getLabels

public int getLabels()
Returns the number of labels of the model which the layout has been calculated for.

Returns:
the number of labels of the model which the layout has been calculated for.

setLabels

public void setLabels(int labels)
Sets the number of edges of the model which the layout has been calculated for.

Parameters:
labels - the number of edges of the model which the layout has been calculated for

getNodes

public int getNodes()
Returns the number of nodes of the model which the layout has been calculated for.

Returns:
the number of nodes of the model which the layout has been calculated for

setNodes

public void setNodes(int nodes)
Sets the number of edges of the model which the layout has been calculated for.

Parameters:
nodes - the number of edges of the model which the layout has been calculated for

getPorts

public int getPorts()
Returns the number of ports of the model which the layout has been calculated for.

Returns:
the number of edges of the model which the layout has been calculated for

setPorts

public void setPorts(int ports)
Sets the number of ports of the model which the layout has been calculated for.

Parameters:
ports - the number of ports of the model which the layout has been calculated for

getTimeTotal

public double getTimeTotal()
Returns the total time the layout took in nanoseconds. This includes supplementary operations and network transfer time.

Returns:
the total time the layout took in nanoseconds

setTimeTotal

public void setTimeTotal(double timeTotal)
Sets the total time the layout took in nanoseconds. This includes supplementary operations and network transfer time.

Parameters:
timeTotal - the total time the layout took in nanoseconds

getTimeLayout

public double getTimeLayout()
Returns the time the layout took solely in nanoseconds. This excludes supplementary operations and network transfer time.

Returns:
the time the layout took solely in nanoseconds

setTimeLayout

public void setTimeLayout(double timeLayout)
Sets the total time the layout took solely in nanoseconds. This excludes supplementary operations and network transfer time.

Parameters:
timeLayout - the total time the layout took solely in nanoseconds

getTimeNetwork

public double getTimeNetwork()
Returns the time the network transfer took in nanoseconds.

Returns:
the time the network transfer took in nanoseconds

setTimeNetwork

public void setTimeNetwork(double timeNetwork)
Sets the time the network transfer took in nanoseconds.

Parameters:
timeNetwork - the time the network transfer took in nanoseconds

getTimeLocalSupplemental

public double getTimeLocalSupplemental()
Returns the time the local supplementary operations took in nanoseconds.

Returns:
the time the local supplementary operations took in nanoseconds

setTimeLocalSupplemental

public void setTimeLocalSupplemental(double timeLocalSupplemental)
Sets the time the local supplementary operations took in nanoseconds.

Parameters:
timeLocalSupplemental - the time the local supplementary operations took in nanoseconds

getTimeRemoteSupplemental

public double getTimeRemoteSupplemental()
Returns the time the remote supplementary operations took in nanoseconds.

Returns:
the time the remote supplementary operations took in nanoseconds

setTimeRemoteSupplemental

public void setTimeRemoteSupplemental(double timeRemoteSupplemental)
Sets the time the remote supplementary operations took in nanoseconds.

Parameters:
timeRemoteSupplemental - the time the remote supplementary operations took in nanoseconds

getElementCount

public int getElementCount()
The number of elements in the model which the layout was calculated for.

Returns:
number of elements in the model which the layout was calculated for

getTotalSpeed

public double getTotalSpeed()
Returns the speed of the layout process in graph elements per second. This value is being calculated including supplementary operations and network transfer time.

Returns:
the speed of the layout process in graph elements per second

getLayoutSpeed

public double getLayoutSpeed()
Returns the speed of the layout process in graph elements per second. This value is being calculated excluding supplementary operations and network transfer time.

Returns:
the speed of the layout process in graph elements per second

getNetworkPart

public double getNetworkPart()
Returns the percentual part of the layout process responsible for network transfer.

Returns:
the percentual part of the layout process responsible for network transfer

getLayoutPart

public double getLayoutPart()
Returns the percentual part of the layout process responsible solely for the layout process.

Returns:
the percentual part of the layout process responsible solely for the layout process

getSupplementalPart

public double getSupplementalPart()
Returns the percentual part of the layout process responsible for local and remote supplementary operations.

Returns:
the percentual part of the layout process responsible for local and remote supplementary operations

getLocalSupplementalPart

public double getLocalSupplementalPart()
Returns the percentual part of the layout process responsible for local supplementary operations.

Returns:
the percentual part of the layout process responsible for local supplementary operations

getRemoteSupplementalPart

public double getRemoteSupplementalPart()
Returns the percentual part of the layout process responsible for remote supplementary operations.

Returns:
the percentual part of the layout process responsible for remote supplementary operations

toString

public String toString()
Returns a string representation of this instance.

Overrides:
toString in class Object
Returns:
a string representation of this instance

fromString

public void fromString(String string)
Parses statistical data from a string representation.

Parameters:
string - string representation from statistical data