‚Äč
com.mobiledgex.matchingengine.performancemetrics.Site Class Reference

Public Member Functions

 Site (Context context, NetTest.TestType testType, int numSamples, String host, int port)
 
 Site (Network network, NetTest.TestType testType, int numSamples, String host, int port)
 
AppClient.Appinstance setAppinstance (AppClient.Appinstance appinstance)
 
LocOuterClass.Loc setCloudletLocation (LocOuterClass.Loc cloudlet_location)
 
void addSample (double time)
 
boolean hasSuccessfulTests ()
 
void recalculateStats ()
 
double min ()
 
double max ()
 
boolean sameSite (Site o)
 

Public Attributes

Network network
 
String host
 
int port
 
String L7Path
 
double lastPingMs
 
NetTest.TestType testType
 
double[] samples
 
double average
 
double stddev
 
AppClient.Appinstance appInstance
 
LocOuterClass.Loc cloudlet_location
 

Static Public Attributes

static final int DEFAULT_NUM_SAMPLES = 3
 

Detailed Description

Utility class used in NetTest to test specified host+port

Constructor & Destructor Documentation

◆ Site() [1/2]

com.mobiledgex.matchingengine.performancemetrics.Site.Site ( Context  context,
NetTest.TestType  testType,
int  numSamples,
String  host,
int  port 
)

Create a Site instance from the default network interface. Once set, it does not change automatically.

Parameters
contextApplication Context
testType(NetTest.TestType)
numSamples(int)
host(String)
port(int)

◆ Site() [2/2]

com.mobiledgex.matchingengine.performancemetrics.Site.Site ( Network  network,
NetTest.TestType  testType,
int  numSamples,
String  host,
int  port 
)

Test performance from a specific network interface. This interface may not be available at the time of test.

Parameters
network(Network)
testType(NetTest.TestType)
numSamples(int)
host(String)
port(int)

Member Function Documentation

◆ max()

double com.mobiledgex.matchingengine.performancemetrics.Site.max ( )

Calculate and then return maximum sample value.

Returns
Maximum sample value. NaN if there are no samples.

◆ min()

double com.mobiledgex.matchingengine.performancemetrics.Site.min ( )

Calculate and then return minimum sample value.

Returns
Minimum sample value. NaN if there are no samples.

◆ setAppinstance()

AppClient.Appinstance com.mobiledgex.matchingengine.performancemetrics.Site.setAppinstance ( AppClient.Appinstance  appinstance)

Appinstance data for the site.

◆ setCloudletLocation()

LocOuterClass.Loc com.mobiledgex.matchingengine.performancemetrics.Site.setCloudletLocation ( LocOuterClass.Loc  cloudlet_location)

GPS Cloudlet location