improve debug timeline data and visualization

This commit is contained in:
Brian Warner 2017-04-17 20:13:14 -04:00
parent 0774ac8c36
commit 5a3f389bd3
3 changed files with 10 additions and 4 deletions

View File

@ -39,13 +39,15 @@ const server_message_color = {
"allocated": 1, // receive
"list": 2, // send
"channelids": 2, // receive
"nameplates": 2, // receive
"claim": 3, // send
"watch": 4, // send
"claimed": 3, // receive
"deallocate": 5, // send
"deallocated": 5, // receive
"open": 4, // send
"release": 5, // send
"released": 5, // receive
"error": 6, // receive
@ -62,6 +64,7 @@ const proc_map = {
"code established": "code-established",
"key established": "key-established",
"transit connected": "transit-connected",
"print": "print",
"exit": "exit",
"transit connect": "transit-connect",
"import": "import"

View File

@ -70,6 +70,7 @@ class Input(object):
@m.output()
def do_start(self):
self._start_timing = self._timing.add("input code", waiting="user")
self._L.refresh()
return Helper(self)
@m.output()
@ -136,6 +137,7 @@ class Input(object):
@m.output()
def do_words(self, words):
code = self._nameplate + "-" + words
self._start_timing.finish()
self._C.finished_input(code)
S0_idle.upon(start, enter=S1_typing_nameplate,

View File

@ -266,6 +266,7 @@ class Receiver:
def _handle_text(self, them_d, w):
# we're receiving a text message
self.args.timing.add("print")
print(them_d["message"], file=self.args.stdout)
self._send_data({"answer": {"message_ack": "ok"}}, w)