Index: utils/plot_task_queue.py |
diff --git a/utils/plot-task-queue.py b/utils/plot_task_queue.py |
similarity index 89% |
rename from utils/plot-task-queue.py |
rename to utils/plot_task_queue.py |
index 78ddf46775aa7b2b5a1362da5ad433ec033ee3df..f57c4bba8025938ff5d85ca6cc1d2b9283ee3b95 100755 |
--- a/utils/plot-task-queue.py |
+++ b/utils/plot_task_queue.py |
@@ -1,6 +1,5 @@ |
#!/usr/bin/env python |
# -*- coding: utf-8 -*- |
-# pylint: disable=invalid-name |
"""Script to plot task queue from profiling data. |
This script requires the matplotlib and numpy Python modules. |
@@ -15,8 +14,9 @@ import glob |
import os |
import sys |
+import numpy # pylint: disable=import-error |
+ |
from matplotlib import pyplot # pylint: disable=import-error |
-from numpy import genfromtxt # pylint: disable=import-error |
def Main(): |
@@ -47,9 +47,10 @@ def Main(): |
names = ['time', 'queued', 'processing', 'to_merge', 'abandoned', 'total'] |
glob_expression = os.path.join(options.profile_path, 'task_queue-*.csv.gz') |
- for csv_file in glob.glob(glob_expression): |
- data = genfromtxt( |
- csv_file, delimiter='\t', dtype=None, names=names, skip_header=1) |
+ for csv_file_name in glob.glob(glob_expression): |
+ data = numpy.genfromtxt( |
+ csv_file_name, delimiter='\t', dtype=None, encoding='utf-8', |
+ names=names, skip_header=1) |
pyplot.plot(data['time'], data['queued'], label='queued') |
pyplot.plot(data['time'], data['processing'], label='processing') |