[Fuego] Background for [PATCH] fix_error_in_flat_plot_data_with_extra_newline

Zhong, Lu zhongl.fnst at cn.fujitsu.com
Wed Nov 7 02:57:27 UTC 2018


Hi

When testing Benchmark.reboot, the following error occurred, and this is due to an extra newline in the flat_plot_data.txt.
Error:
"Error reading line ' 3.785669 le
' in prepare_chart_data.py
Possible data corruption in flat_plot_data.txt
"
The log in flat_plot_data.txt:
m3ulcb_01 Benchmark.reboot default 4 2018-10-11T07:28:46+0000 4.9.0-yocto-standard default.reboot.time 10
3.576811 le

And the reference value(with an extra newline) in flat_plot_data.txt is get from reference.log by function convert_reference_log_to_criteria().
So we modify the code in convert_reference_log_to_criteria() as following:

            tguid = "%s.%s.%s" % (ts_name, tc_name, measure_name)
-            value = lines[i+1]
+            value = lines[i+1].rstrip("\n")
            reference = {"value":value, "operator": operation.strip()}
            crit = {"tguid":tguid, "reference": reference }
            crit_list.append(crit)
//lines is the content of reference.log, and lines[i+1] contains an extra "\n"

After using this patch, the log in flat_plot_data.txt is as following:
m3ulcb_01 Benchmark.reboot default 4 2018-10-11T07:28:46+0000 4.9.0-yocto-standard default.reboot.time 10 3.576811 le


I have submitted this patch.
--[PATCH] fix_error_in_flat_plot_data_with_extra_newline


I am looking forward to your reply.

BR

Zhong


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/fuego/attachments/20181107/80245f71/attachment.html>


More information about the Fuego mailing list