git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dd0d9df
)
stop writing progress after profile_final
author
Felix Domke
<tmbinc@elitedvb.net>
Fri, 8 Feb 2008 00:01:04 +0000
(
00:01
+0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Fri, 8 Feb 2008 00:01:04 +0000
(
00:01
+0000)
lib/python/Tools/Profile.py
patch
|
blob
|
history
diff --git
a/lib/python/Tools/Profile.py
b/lib/python/Tools/Profile.py
index 1c44bc84578e611999db4ab5e88fd019e5bf51eb..7e61da0f2abc66c776c6e34ca205ca378a452691 100644
(file)
--- a/
lib/python/Tools/Profile.py
+++ b/
lib/python/Tools/Profile.py
@@
-1,3
+1,4
@@
+# the implementation here is a bit crappy.
import time
from Directories import resolveFilename, SCOPE_SYSETC
import time
from Directories import resolveFilename, SCOPE_SYSETC
@@
-27,13
+28,14
@@
def profile(id):
now = time.time() - profile_start
if profile_file:
profile_file.write("%.2f\t%s\n" % (now, id))
now = time.time() - profile_start
if profile_file:
profile_file.write("%.2f\t%s\n" % (now, id))
- if id in profile_data:
- t = profile_data[id]
- perc = t * (PERCENTAGE_END - PERCENTAGE_START) / total_time + PERCENTAGE_START
- try:
- open("/proc/progress", "w").write("%d \n" % perc)
- except IOError:
- pass
+
+ if id in profile_data:
+ t = profile_data[id]
+ perc = t * (PERCENTAGE_END - PERCENTAGE_START) / total_time + PERCENTAGE_START
+ try:
+ open("/proc/progress", "w").write("%d \n" % perc)
+ except IOError:
+ pass
def profile_final():
global profile_file
def profile_final():
global profile_file