.

mpiControlStatusCacheStatistics

Declaration

 
MPI_DECL1 long MPI_DECL2
mpiControlStatusCacheStatistics(MPIControl	control,
	MPIControlStatusCacheStatistics		*statistics);
  Required Header: control.h
Change History: Added in 03.04.11

Description

mpiControlStatusCacheStatistics retrieves the cache refresh statistics and returns them in the MPIControlStatusCacheStatistics structure. The statistics are based on the how much time it has taken to refresh the local cache from the server. The user can use the average refresh time as a basis for setting the cache refresh interval with mpiControlStatusCacheIntervalSet.

Note: If statistics.count is zero, then the other statistic values provide no meaningful data. As the value of statistics.count increases, the significance of the statistics values also increases.

control Handle to the Control object.

Return Values  
MPIControlMessageSTATUS_CACHING_DISABLED Caching has not been enabled.

Sample Code

The following sample function executes mpiControlStatusCacheRefresh a given number of times and then prints out the refresh time statistics.

void Statistics(MPIControl control, int iterationCount)
{
	long	returnValue;
	MPIControlStatusCacheStatistics	statistics;
	
	/* Enable caching by setting a refresh interval */
	returnValue = mpiControlStatusCacheIntervalSet(control, 50);
	msgCHECK(returnValue);
	
	while (--iterationCount >= 0)
	{
		returnValue = mpiControlStatusCacheRefresh(control);
		msgCHECK(returnValue);
	}
	
	mpiControlStatusCacheStatistics(control, &statistics);
	msgCHECK(returnValue);
	
	printf("iterations --------- %d\n", 
		statistics.count);
	printf("minimum ------------ %.3lf\n", 
		statistics.min);
	printf("maximum ------------ %.3lf\n", 
		statistics.max);
	printf("mean --------------- %.3lf\n", 
		statistics.mean);
	printf("standard deviation - %.3lf\n", 
		statistics.standardDeviation);
}

 

See Also

Status Caching | mpiControlStatusCacheIntervalSet | mpiControlStatusCacheStatisticsReset | mpiControlStatusCacheRefresh

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering