summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-08-02 09:43:38 -0700
committerEric Anholt <eric@anholt.net>2012-08-02 09:43:38 -0700
commit9a1e3b9e732b74f2381d75b84008cb6049f0b068 (patch)
tree77f17ca43ab9135bc7524767446cbdcd1d6ee272
parent60081fb7bb8d762e8302dc1ee1e7203d42f8690e (diff)
Print seconds spent instead of ns.timing
Now I don't need to count 9 decimal places to see if the number is believable.
-rwxr-xr-xscripts/profileshader.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/profileshader.py b/scripts/profileshader.py
index 278480cc..a53dc423 100755
--- a/scripts/profileshader.py
+++ b/scripts/profileshader.py
@@ -60,13 +60,13 @@ for line in open(sys.argv[1], 'r'):
sortedShaderTimes = sorted(shaderTimes.items(), key=lambda x: x[1]['duration'], reverse=True)
print '+------------+--------------+--------------------+--------+--------------+-------------+'
-print '| Shader[id] | Draws [#] | Duration [ns] v | % | Per Call[ns] | Longest[id] |'
+print '| Shader[id] | Draws [#] | Duration [s] v | % | Per Call[ns] | Longest[id] |'
print '+------------+--------------+--------------------+--------+--------------+-------------+'
for shader in sortedShaderTimes:
id = str(shader[0]).rjust(10)
draw = str(shader[1]['draws']).rjust(12)
- dura = str(shader[1]['duration']).rjust(18)
+ dura = "%18.10f" % (float(shader[1]['duration']) / 1000000000.0)
perc = '%5.1f' % (float(shader[1]['duration']) / total_duration * 100)
perCall = str(shader[1]['duration'] / shader[1]['draws']).rjust(12)
longest = str(shader[1]['longest']).rjust(11)