| In recent years,the applications of Internet of Things(IoT)have developed rapidly,and the use of the IoT cloud service platform has become more and more widespread.Therefore,the testing and evaluation for the performance of the IoT cloud service platform has gradually received extensive attention from IoT application developers.IoT cloud services generally implements message delivery between terminals and devices through publish/subscribe messaging protocol.Compared with the request/response protocols commonly used in the traditional Internet,the test scheme of the publish/subscribe protocol is not mature enough,the test tools are also scarce.On the other hand,the analysis of system logs is an important method to check the performance of cloud service systems.Therefore,the appropriate log analysis algorithm can well support the testing and performance evaluation of the IoT cloud service platform.In order to explore the performance testing scheme and practical application method of the IoT cloud service platform,this thesis designs and implements the performance testing system for the IoT cloud service based on the open source testing tool Locust For the publish/subscribe service represented by the Message Queuing Telemetry Transport(MQTT)protocol,test schemes for the performance of server to handle connection establishment,connection maintenance and message release are designed.In combination with the Device Shadow service,a test scheme for the publish of MQTT messages with QoS 0 is proposed.Then,with reference to the test schemes,the I/O multiplexing mechanism and concurrency mechanism of the MQTT client library were modified,the Locust project source code was modified.And,the Locust class encapsulating the client code and the script for simulating user behavior were implemented.Finally,the effectiveness of the test schemes and the performance testing system is verified by the performance test of the actual MQTT IoT service cloud platform.In addition,for the request/response service represented by the HyperText Transfer Protocol(HTTP),a general test scheme for HTTP interface performance is first clarified.Secondly,by modifying the source code and writing Python test scripts,based on the Locust project,we realized a performance test system for HTTP services that can obtain interface performance evaluation data through automatic and multiple rounds testing.Finally,the effectiveness of the test system is verified on the actual IoT cloud service platform that provides HTTP services.In addition,in order to explore the application of log analysis in IoT cloud service testing and performance evaluation,this thesis studies the log clustering algorithm for IoT cloud service.LogCluster is a density-based log clustering algorithm that clusters the line patterns of logs representing different cloud service events from the log data and the frequency they appear in the log.In this thesis,to solve three defects found in the practical application of the algorithm,an optimization algorithm is proposed based on LogCluster.By improving the calling sequence of the heuristic method in the algorithm,the candidate line patterns whose occurrences are lower than the threshold can be aggregated before being filtered by the algorithm,which solves the problem that the effective clustering result cannot be output when the threshold is high.By improving the outlier judgment logic,the algorithm does not ignore the valid log lines counted by the heuristic method anymore when judging the outliers,so that the outlier output is more in line with the clustering result.At the same time,the optimization algorithm can automatically adjust the threshold for multi-round clustering and output multi-level clustering results,which simplifies labor costs in real applications.Finally,the experimental results show that the improved algorithm can output more patterns and multi-level clustering results while maintaining similar running time,which is more conducive to the testing and performance evaluation of the IoT cloud service. |