Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
12ac3e1f
Commit
12ac3e1f
authored
Jul 12, 2004
by
Nicholas Bastin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using repr() generates entries that the current stats package can't
collate, so setting it back to the function name
parent
b1027643
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Lib/profile.py
Lib/profile.py
+4
-4
Lib/test/output/test_profile
Lib/test/output/test_profile
+3
-3
No files found.
Lib/profile.py
View file @
12ac3e1f
...
...
@@ -216,7 +216,7 @@ class Profile:
t
=
t
[
0
]
+
t
[
1
]
-
self
.
t
-
self
.
bias
if
event
==
"c_call"
:
self
.
c_func_name
=
repr
(
arg
)
self
.
c_func_name
=
arg
.
__name__
if
self
.
dispatch
[
event
](
self
,
frame
,
t
):
t
=
timer
()
...
...
@@ -233,7 +233,7 @@ class Profile:
t
=
timer
()
-
self
.
t
-
self
.
bias
if
event
==
"c_call"
:
self
.
c_func_name
=
repr
(
arg
)
self
.
c_func_name
=
arg
.
__name__
if
self
.
dispatch
[
event
](
self
,
frame
,
t
):
self
.
t
=
timer
()
...
...
@@ -248,7 +248,7 @@ class Profile:
t
=
timer
()
/
60.0
-
self
.
t
-
self
.
bias
if
event
==
"c_call"
:
self
.
c_func_name
=
repr
(
arg
)
self
.
c_func_name
=
arg
.
__name__
if
self
.
dispatch
[
event
](
self
,
frame
,
t
):
self
.
t
=
timer
()
/
60.0
...
...
@@ -262,7 +262,7 @@ class Profile:
t
=
get_time
()
-
self
.
t
-
self
.
bias
if
event
==
"c_call"
:
self
.
c_func_name
=
repr
(
arg
)
self
.
c_func_name
=
arg
.
__name__
if
self
.
dispatch
[
event
](
self
,
frame
,
t
):
self
.
t
=
get_time
()
...
...
Lib/test/output/test_profile
View file @
12ac3e1f
...
...
@@ -4,9 +4,9 @@ test_profile
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
12 0.000 0.000 0.012 0.001 :0(
<built-in function hasattr>
)
8 0.000 0.000 0.000 0.000 :0(
<built-in function range>
)
1 0.000 0.000 0.000 0.000 :0(
<built-in function setprofile>
)
12 0.000 0.000 0.012 0.001 :0(
hasattr
)
8 0.000 0.000 0.000 0.000 :0(
range
)
1 0.000 0.000 0.000 0.000 :0(
setprofile
)
1 0.000 0.000 1.000 1.000 <string>:1(?)
0 0.000 0.000 profile:0(profiler)
1 0.000 0.000 1.000 1.000 profile:0(testfunc())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment