forked from matstc/shell-profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.md.html
40 lines (33 loc) · 1.3 KB
/
README.md.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!-- custom html -->
<style>
*, div, td {font-family:Ubuntu;}
code {font-family:Ubuntu Monospace, Monospace, Courier;}
ul {list-style-type:square;}
h1, h2, h3, h4, h5, h6 {margin-top:1.6em; margin-bottom:0.5em;}
p {white-space: pre-wrap;}
table {border-spacing:0; background-color:#eee; padding:4px;}
table td {border-top:1px #888 solid; padding: 0.4em 0.5em;}
h1, table th {font-variant:small-caps;}
table th {font-size:120%;}
img {border:6px #eee solid;}
.title {font-size:120%; white-space:pre-wrap;}
.toc ul {margin-bottom:1em;}
.toc li {line-height:1.5em;}
</style>
<div>
<p>This python script can be used to profile a shell script.</p>
<p>Once the script is on the path, call it like so:</p>
<pre><code>~> profile test-file.sh PARAM1 PARAM2
</code></pre>
<p>The output will look something like the following:</p>
<pre><code>0.291234732 > /bin/bash line 7 echo 'loop: 1'
0.289730072 > /bin/bash line 6 for i in '`seq 100`'
0.006031990 > /bin/bash line 5 seq 10
0.005759716 >> /bin/bash line 8 seq 100
0.003070116 > /bin/bash line 9 echo c
0.003000021 > /bin/bash line 4 echo b
0.002927542 > /bin/bash line 3 echo a
0.002631426 > /bin/bash line 2 echo test-file.sh
0.000000000 > /bin/bash line 10 echo --- END OF PROFILING ---
</code></pre>
</div>