Search in sources :

Example 1 with WorkloadIntensity

use of org.iobserve.analysis.behavior.karlsruhe.data.WorkloadIntensity in project iobserve-analysis by research-iobserve.

the class ClusteringPrePostProcessing method setTheWorkloadIntensityForTheEntryCallSequenceModels.

/**
 * It calculates and sets for each entryCallSequenceModel its specific workload intensity. For
 * that it calculates an open or a closed workload and adds it to its entryCallSequenceModel.
 *
 * @param entryCallSequenceModels
 *            are the entryCallSequenceModels of the detected user groups
 * @param isClosedWorkload
 *            states whether a closed or an open workload is requested by the user
 */
public void setTheWorkloadIntensityForTheEntryCallSequenceModels(final List<UserSessionCollectionModel> entryCallSequenceModels, final boolean isClosedWorkload) {
    for (final UserSessionCollectionModel entryCallSequenceModel : entryCallSequenceModels) {
        final WorkloadIntensity workloadIntensity = new WorkloadIntensity();
        if (isClosedWorkload) {
            this.calculateTheNumberOfConcurrentUsers(entryCallSequenceModel.getUserSessions(), workloadIntensity);
        } else {
            this.calculateInterarrivalTime(entryCallSequenceModel.getUserSessions(), workloadIntensity);
        }
        entryCallSequenceModel.setWorkloadIntensity(workloadIntensity);
    }
}
Also used : WorkloadIntensity(org.iobserve.analysis.behavior.karlsruhe.data.WorkloadIntensity) UserSessionCollectionModel(org.iobserve.analysis.data.UserSessionCollectionModel)

Aggregations

WorkloadIntensity (org.iobserve.analysis.behavior.karlsruhe.data.WorkloadIntensity)1 UserSessionCollectionModel (org.iobserve.analysis.data.UserSessionCollectionModel)1