Crossfire Client, Trunk
pprof-latency.py
Go to the documentation of this file.
1
"""
2
pprof-latency.py -- process Crossfire client latency profile
3
"""
4
import
sys
5
6
def
main
():
7
data = sys.stdin.readlines()
8
fields =
map
(
lambda
l: l.strip().split(
','
), data)
9
pending = {}
10
for
f
in
fields:
11
if
f[0] ==
'profile/com'
:
12
n, t, cmd = f[1:]
13
n = int(n)
14
t = int(t)
15
pending[n] = (t, cmd)
16
elif
f[0] ==
'profile/comc'
:
17
n, t, s, _ = f[1:]
18
n = int(n)
19
t = int(t)
20
tdiff = t - pending[n][0]
21
cmd = pending[n][1]
22
del pending[n]
23
print(
"%d,%s"
% (tdiff, cmd))
24
25
if
__name__ ==
'__main__'
:
26
main
()
pprof-latency.main
def main()
Definition:
pprof-latency.py:6
map
static item * map
Definition:
item.c:27
crossfire-crossfire-client
utils
pprof-latency.py
Generated by
1.8.17