Here I will using Storperf integration case to illustrate how to run plug-in test cases and store test results into community's InfluxDB.
As shown in the graph above, there are two ways to store Storperf test results into community's InfluxDB.
- Yardstick asks Storperf to run the test case. After the test case is completed, Yardstick reads test results via ReST API from Storperf and posts test data to the influxDB.
Additionally, Storperf can run tests by itself and post the test result directly to the InfluxDB. The method for posting data directly to influxDB will be supported in the future.
Our plan is to support rest-api in D release so that other testing projects can call the rest-api to use yardstick dispatcher service to push data to yardstick's influxdb database.
For now, influxdb only support line protocol, and the json protocol is deprecated.
Take ping test case for example, the raw_result is json format like this:
with the help of "influxdb_line_protocol“, the json is transform to like below as a line string:
so, for data output of json format, you just need to transform json into line format and call influxdb api to post the data into the database. All this function has been implemented in yardstick(https://git.opnfv.org/cgit/yardstick/tree/yardstick/dispatcher/influxdb.py)
If you need support on this, please contact email@example.com
Grafana will be used for visualizing the collected test data.
A grafana dashboard has been created for Storperf test results visualization.