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
69eb69c4
Commit
69eb69c4
authored
Jun 13, 2006
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Whitespace normalization.
parent
e293e1f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
Tools/pybench/Calls.py
Tools/pybench/Calls.py
+0
-2
Tools/pybench/clockres.py
Tools/pybench/clockres.py
+2
-3
Tools/pybench/pybench.py
Tools/pybench/pybench.py
+2
-2
No files found.
Tools/pybench/Calls.py
View file @
69eb69c4
...
@@ -500,5 +500,3 @@ h(i,i,i,2,i,3)
...
@@ -500,5 +500,3 @@ h(i,i,i,2,i,3)
timeit
.
main
([
'-s'
,
setup
,
timeit
.
main
([
'-s'
,
setup
,
test
])
test
])
Tools/pybench/clockres.py
View file @
69eb69c4
...
@@ -20,7 +20,7 @@ def clockres(timer):
...
@@ -20,7 +20,7 @@ def clockres(timer):
while
1
:
while
1
:
now
=
wallclock
()
now
=
wallclock
()
if
now
>=
stop
:
if
now
>=
stop
:
break
break
for
i
in
spin_loops
:
for
i
in
spin_loops
:
d
[
timer
()]
=
1
d
[
timer
()]
=
1
values
=
d
.
keys
()
values
=
d
.
keys
()
...
@@ -33,7 +33,7 @@ def clockres(timer):
...
@@ -33,7 +33,7 @@ def clockres(timer):
return
min_diff
return
min_diff
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
print
'Clock resolution of various timer implementations:'
print
'Clock resolution of various timer implementations:'
print
'time.clock: %10.3fus'
%
(
clockres
(
time
.
clock
)
*
1e6
)
print
'time.clock: %10.3fus'
%
(
clockres
(
time
.
clock
)
*
1e6
)
print
'time.time: %10.3fus'
%
(
clockres
(
time
.
time
)
*
1e6
)
print
'time.time: %10.3fus'
%
(
clockres
(
time
.
time
)
*
1e6
)
try
:
try
:
...
@@ -41,4 +41,3 @@ if __name__ == '__main__':
...
@@ -41,4 +41,3 @@ if __name__ == '__main__':
print
'systimes.processtime: %10.3fus'
%
(
clockres
(
systimes
.
processtime
)
*
1e6
)
print
'systimes.processtime: %10.3fus'
%
(
clockres
(
systimes
.
processtime
)
*
1e6
)
except
ImportError
:
except
ImportError
:
pass
pass
Tools/pybench/pybench.py
View file @
69eb69c4
...
@@ -418,7 +418,7 @@ class Benchmark:
...
@@ -418,7 +418,7 @@ class Benchmark:
def
__init__
(
self
,
name
,
verbose
=
None
,
timer
=
None
,
warp
=
None
,
def
__init__
(
self
,
name
,
verbose
=
None
,
timer
=
None
,
warp
=
None
,
calibration_runs
=
None
):
calibration_runs
=
None
):
if
name
:
if
name
:
self
.
name
=
name
self
.
name
=
name
else
:
else
:
...
@@ -438,7 +438,7 @@ class Benchmark:
...
@@ -438,7 +438,7 @@ class Benchmark:
if
_debug
:
if
_debug
:
print
'Getting machine details...'
print
'Getting machine details...'
self
.
machine_details
=
get_machine_details
()
self
.
machine_details
=
get_machine_details
()
# Make .version an instance attribute to have it saved in the
# Make .version an instance attribute to have it saved in the
# Benchmark pickle
# Benchmark pickle
self
.
version
=
self
.
version
self
.
version
=
self
.
version
...
...
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