Crossfire Client, Trunk
crossfire-crossfire-client
utils
pprof-latency.py
Go to the documentation of this file.
1
"""
2
pprof-latency.py -- process Crossfire client latency profile
3
usage:
4
1. gather a profile using:
5
6
$ crossfire-client-gtk2 --profile-latency > out.txt
7
8
2. process the profile:
9
10
$ python3 utils/pprof-latency.py out.txt
11
"""
12
import
sys
13
14
def
main
():
15
if
len(sys.argv) < 2:
16
print(
"usage: python3 pprof-latency.py FILE"
)
17
return
18
19
path = sys.argv[1]
20
with
open(path,
'r'
)
as
dat, open(path +
".hist"
,
'w'
)
as
hist:
21
data = dat.readlines()
22
fields =
map
(
lambda
l: l.strip().split(
'\t'
), data)
23
pending = {}
24
for
f
in
fields:
25
if
f[0] ==
'profile/com'
:
26
n, cmd = f[1:]
27
n = int(n)
28
pending[n] = cmd
29
elif
f[0] ==
'profile/comc'
:
30
n, t, s, _ = f[1:]
31
n = int(n)
32
t = int(t)
33
tdiff = t
34
cmd = pending[n]
35
del pending[n]
36
print(
"%d,%s"
% (tdiff, cmd))
37
print(
"%d"
% tdiff, file=hist)
38
39
if
__name__ ==
'__main__'
:
40
main
()
installer
To create a Windows client installer
Definition:
nsis.txt:1
in
static GInputStream * in
Definition:
client.c:71
client
To create a Windows client you need NSIS First build the client
Definition:
nsis.txt:3
pprof-latency.main
def main()
Definition:
pprof-latency.py:14
needed
To create a Windows client you need NSIS First build the then put all its required files into a files subdirectory of the directory containing this readme if needed
Definition:
nsis.txt:5
map
static item * map
Definition:
item.c:27
script
Definition:
script.c:120
Generated by
1.8.17