Show connection cpu time on stats page
This commit is contained in:
parent
55417a1103
commit
51c3ae15e8
1 changed files with 2 additions and 1 deletions
|
@ -92,7 +92,7 @@ class UiRequestPlugin(object):
|
||||||
len(main.file_server.connections), main.file_server.last_connection_id
|
len(main.file_server.connections), main.file_server.last_connection_id
|
||||||
)
|
)
|
||||||
yield "<table><tr> <th>id</th> <th>proto</th> <th>type</th> <th>ip</th> <th>open</th> <th>crypt</th> <th>ping</th>"
|
yield "<table><tr> <th>id</th> <th>proto</th> <th>type</th> <th>ip</th> <th>open</th> <th>crypt</th> <th>ping</th>"
|
||||||
yield "<th>buff</th> <th>bad</th> <th>idle</th> <th>open</th> <th>delay</th> <th>out</th> <th>in</th> <th>last sent</th>"
|
yield "<th>buff</th> <th>bad</th> <th>idle</th> <th>open</th> <th>delay</th> <th>cpu</th> <th>out</th> <th>in</th> <th>last sent</th>"
|
||||||
yield "<th>waiting</th> <th>version</th> <th>sites</th> </tr>"
|
yield "<th>waiting</th> <th>version</th> <th>sites</th> </tr>"
|
||||||
for connection in main.file_server.connections:
|
for connection in main.file_server.connections:
|
||||||
if "cipher" in dir(connection.sock):
|
if "cipher" in dir(connection.sock):
|
||||||
|
@ -112,6 +112,7 @@ class UiRequestPlugin(object):
|
||||||
("since", max(connection.last_send_time, connection.last_recv_time)),
|
("since", max(connection.last_send_time, connection.last_recv_time)),
|
||||||
("since", connection.start_time),
|
("since", connection.start_time),
|
||||||
("%.3f", connection.last_sent_time - connection.last_send_time),
|
("%.3f", connection.last_sent_time - connection.last_send_time),
|
||||||
|
("%.3fs", connection.cpu_time),
|
||||||
("%.0fkB", connection.bytes_sent / 1024),
|
("%.0fkB", connection.bytes_sent / 1024),
|
||||||
("%.0fkB", connection.bytes_recv / 1024),
|
("%.0fkB", connection.bytes_recv / 1024),
|
||||||
("%s", connection.last_cmd),
|
("%s", connection.last_cmd),
|
||||||
|
|
Loading…
Reference in a new issue