FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
python-iracing-api/benchmark.py at master · STSAB/python-iracing-api · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
STSAB
/
python-iracing-api
Public
forked from
thisismyrobot/python-iracing-api
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
python-iracing-api
/
benchmark.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
47 lines (32 loc) · 1.27 KB
Breadcrumbs
python-iracing-api
/
benchmark.py
Copy path
File metadata and controls
47 lines (32 loc) · 1.27 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
40
41
42
43
44
45
46
47
""" Benchmarker.
Current results on my (mid performance) machine:
Press any key to begin telemetry access benchmark...
Setting up...
Attempting to read current all telemetry keys 10000 times each... Done!
10000 reads of all keys executed in 6.1890001297 seconds
Read rate for all 91 telementry values is: 1615.7698805 Hz
Read rate for a single telementry value is: 147035.059126 Hz
"""
import
api
import
time
ITER
=
10000
print
"Press any key to begin telemetry access benchmark..."
,
raw_input
()
print
"Setting up..."
client
=
api
.
API
()
client
[
'Speed'
]
keys
=
client
.
_telemetry_names
print
"Attempting to read current all telemetry keys {0} times each..."
.
format
(
ITER
),
start
=
time
.
time
()
for
i
in
range
(
ITER
):
for
k
in
keys
:
_
=
client
[
k
]
end
=
time
.
time
()
duration
=
end
-
start
all_telem_hz
=
1
/
(
duration
/
ITER
)
telem_hz
=
all_telem_hz
*
len
(
keys
)
print
"Done!"
print
"{0} reads of all keys executed in {1} seconds"
.
format
(
ITER
,
duration
)
print
"Read rate for all {0} telementry values is: {1} Hz"
.
format
(
len
(
keys
),
all_telem_hz
)
print
"Read rate for a single telementry value is: {0} Hz"
.
format
(
telem_hz
)
Back
|
FazBrowse Home
|
New Git URL