-
Notifications
You must be signed in to change notification settings - Fork 0
BWCPS Stream Analysis
The BWCPS Project provides two exemplary analysis implementations for BWCPS Stream model instances:
- BWCPS Timeliness Analysis
- BWCPS Bandwidth Analysis
Further an extension point and interfaces are offered to create custom analyses for application on any BWCPS instances.
To execute any BWCPS analysis on an model instance, right click the StreamRepository element (or any BWCPS element in the model) in the BWCPS TreeViewer and select either Analyze BWCPS Instance -> Run all analyses or select a single specific analysis for execution Analyze BWCPS Instance -> 'Analysis Name'. After completion of the analysis any informations, warnings or errors will be displayed in the Eclipse Problems View. Double clicking an analysis result will highlight the element concerned in the TreeViewer.
The goal of the timeliness analysis is to calculate the latency a BWCPS Stream yields. This is achieved by summing up the total processing time needed for each node concerned by the stream. Eventual transmission latencies on NodeLinks are neglected by this algorithm.
The processing duration consumed by a node is calculated by adding up the processingUnits of all deployed operations and dividing the amount by the processingSpeed the containing NodeContainer possesses. Finally all node latencies of the stream are summed up and attached as information to the concerning BWCPS Stream element.
The basic idea of the bandwidth analysis is to to validate that all NodeLinks provide enough bandwidth for data transferred between nodes. Therefore the algorithm validates three points for each Node of the BWCPS Model:
- If input size > 0 then at least one incoming connection should exists
- Total output size per second has to be smaller than or equal to the summed bandwidth of all outgoing links
- Total output size of the node has to be smaller than or equal to the input size of all connected outgoing link targets
If any of these points are invalidated the analysis attaches a warning to the concerning node with a reasoning which constraint was broken. This way the analysis can be executed either on a number of nodes at the same time of analyze one single node on its own.
The complete Framework and the two exemplary analysis implementations can be found in the de.fzi.bwcps.stream.analysis project. Any BWCPS analysis must implement the fzi.bwcps.stream.analysis.BWCPSAnalysis interface that guarantees the existence of a run(..) method which takes a Collection of BWCPS Elements and returns any number of BWCPSAnalysisReports. An analysis can also implement the BWCPSSingleElementAnalysis interface that guarantees an additional run(..) method analyzing a single BWCPS element.
The return type of any BWCPS analysis must be a list of de.fzi.bwcps.stream.analysis.report.BWCPSAnalysisReport elements. Any BWCPSAnalysisReport element represents a results report of the analysis and can be of the type: INFO, WARNING or ERROR. Additionally every report contains a report message, a link to the target BWCPS element the report is attached to and an optional number of nested more detailed reports about the issue.