## 5 Performance Evaluation Results  
With the objective to validate the systems performance several trials were conducted both in real (as in Section 4) and simulated environment for one PF facility environment. Testing the system on two application scenarios allowed its proper analysis and evaluation in terms of health, operation, and performance, whereas considerable attention was given to the validation of the response time parameter, in terms of the real-time constraint. At first it has been verified that raw data were being suitably acquired, transferred, stored and managed in the Microsoft Azure cloud platform to retrieve the relevant information as illustrated in Figure 20.  
Metrics, as numerical values, helping to understand the health, operation, and performance of the system are available from Azure Resources in the platform's backend as in the screenshots depicted below (Figures 21 and 22). Figure 20: Screenshot of nodes as presented in the Microsoft Azure Platform virtual machine frontend. The average server response time is probably the most important among the validated parameters concerning the system's performance, as it represents the time spent from the arrival of a request into the cloud context-aware middleware performing the required operations over the data acquired by the WSAN until the dissemination of the processed contextual information to the applications of interest. The average response time of the server as deriving from the metrics depicted in Figure 21 is 56.82 ms, which is considered to quite satisfactory for the system's performance. Additionally, the average response time representing the period required for both semantic and mapping rules to be executed upon the arrival of an XML message has been measured during the tests as depicted in Figure 23. In particular, the chart demonstrates the results of testing the system's behavior for one, five and ten mapping rules while the axes of the chart represent the number of messages that have been received in each case by the middleware component in relation to the response time. As it appears from the results, the system performs extremely well for 1 and 5 mapping rules, reaching the average response time of the server as provided by the Azure Resources metrics, for 10 mapping rules. Figure 21: Screenshot of the system’s performance overview as in the Microsoft Azure Platform backend. Figure 22: Server screenshot of the system’s performance overview as in the Microsoft Azure Platform backend. In general, according to the outcomes provided by the metrics obtained during the tests, the proposed system performs fairly satisfactory for controlling one PF facility environment since sensory data could be adequately acquired, processed, stored in the knowledge base, retrieved and disseminated to the applications of interest, resulting consequently into the proper actions. Nevertheless, the performance of the system is intended to be more thoroughly tested by evaluating additional parameters and integrating multiple PF environments for various cultivations and in distinct locations as part of future research. As part of the system's evaluation, the performance of implementing K-means algorithm for clustering has also been tested. Let as note that for this purpose the Python programming language was used. The graph in Figure 24 illustrates a scatter plot of data regarding soil moisture usage. The data are colored according to the plant group they belong to depending their behavior under two different irrigation scenarios. This means that we consider the two clusters as plant groups that indicate different kinds of behavior under the two different irrigation scenarios. The star symbol represents the centroid for each cluster. In this test, the K-means algorithm has been run on the data for K = 2.