浏览代码

Fix reading dstat results (#4996)

* Fix reading dstat results

* remove print
Nate 6 年之前
父节点
当前提交
d8fb6ff787
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      toolset/utils/results.py

+ 2 - 2
toolset/utils/results.py

@@ -461,8 +461,8 @@ class Results:
         stats_file = self.get_stats_file(framework_test.name, test_type)
         stats_file = self.get_stats_file(framework_test.name, test_type)
         with open(stats_file) as stats:
         with open(stats_file) as stats:
             # dstat doesn't output a completely compliant CSV file - we need to strip the header
             # dstat doesn't output a completely compliant CSV file - we need to strip the header
-            while stats.next() != "\n":
-                pass
+            for _ in range(4):
+                stats.next()
             stats_reader = csv.reader(stats)
             stats_reader = csv.reader(stats)
             main_header = stats_reader.next()
             main_header = stats_reader.next()
             sub_header = stats_reader.next()
             sub_header = stats_reader.next()