Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(469)

Unified Diff: utils/plot_task_queue.py

Issue 343850043: [plaso] Added utility scripts to plot tasks profiling data (Closed)
Patch Set: Changes after review Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/plot_memory_usage.py ('k') | utils/plot_tasks.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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')
« no previous file with comments | « utils/plot_memory_usage.py ('k') | utils/plot_tasks.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b