From a619cbcb215f637f43b5ef8c4f6b4e9a6be6abe9 Mon Sep 17 00:00:00 2001 From: "Kevin A. Tactac" Date: Tue, 22 Oct 2024 10:11:58 -0400 Subject: [PATCH] Address comments --- README.md | 3 ++- src/mantidprofiler/algorithm_tree.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86e6c80..c5cdb2b 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It monitors CPU and RAM usage, and reports the time span of each algorithm (curr To profile the `SNSPowderReduction.py` workflow: ``` -python SNSPowderReduction.py & python path/to/mantid-profiler/mantid-profiler.py $! +python SNSPowderReduction.py & python path/to/mantid-profiler/src/mantidprofiler/mantidprofiler.py $! ``` The script attaches to the last spawned process, so you can also use the profiler if you are working with `MantidPlot`: ``` @@ -41,6 +41,7 @@ You can interact with a demo profile [here](http://www.nbi.dk/~nvaytet/SNSPowder - `-h`, `--help` show this help message and exit - `--outfile OUTFILE` name of output html file (default: `profile.html`) - `--infile INFILE` name of input file containing algorithm timings (default: `algotimeregister.out`) + - - `--logfile LOGFILE` name of output file containing process monitor data (default: `mantidprofile.txt`) - `--diskfile DISKFILE` name of output file containing process disk usage data (default: `mantiddisk.txt`) - `--interval INTERVAL` how long to wait between each sample (in seconds). By default the process is sampled as often as possible. (default: None) diff --git a/src/mantidprofiler/algorithm_tree.py b/src/mantidprofiler/algorithm_tree.py index b7194e0..10a3706 100644 --- a/src/mantidprofiler/algorithm_tree.py +++ b/src/mantidprofiler/algorithm_tree.py @@ -136,7 +136,7 @@ def apply_multiple_trees(trees, check, func): def parseLine(line): res = { "thread_id": re.search("ThreadID=([0-9]*)", line)[1], - "name": re.search("AlgorithmName=(.*)", line)[1], + "name": re.search("AlgorithmName=([a-zA-Z]*)", line)[1], "start": int(re.search("StartTime=([0-9]*)", line)[1]), "finish": int(re.search("EndTime=([0-9]*)", line)[1]), }