diff options
author | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-02-21 12:18:11 +0000 |
---|---|---|
committer | Jim MacArthur <jim.macarthur@codethink.co.uk> | 2018-03-01 14:36:08 +0000 |
commit | 14234ccce3e7eec1153e810fab75afb2e90a2b22 (patch) | |
tree | 137ab31d2ab163a30c706d807111a9da120d567e /buildstream/_message.py | |
parent | ad2781c2aac6af88a85a860e85534b610e2d4592 (diff) | |
download | buildstream-14234ccce3e7eec1153e810fab75afb2e90a2b22.tar.gz |
Add sequence ID and widget for it.
The idea of a sequence number/ID is to tie together all messages
associated with a given timed activity, to make performance
analysis easier.
_context.py: Add sequence number with atomic increment
_widget.py: SequenceID widget, which displays this value
_message.py: sequence_id variable storing the sequence for a message.
Diffstat (limited to 'buildstream/_message.py')
-rw-r--r-- | buildstream/_message.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/buildstream/_message.py b/buildstream/_message.py index 48b38b732..5183a0df2 100644 --- a/buildstream/_message.py +++ b/buildstream/_message.py @@ -59,7 +59,8 @@ class Message(): depth=None, logfile=None, sandbox=None, - scheduler=False): + scheduler=False, + sequence_id=None): self.message_type = message_type # Message type self.message = message # The message string self.detail = detail # An additional detail string @@ -72,6 +73,6 @@ class Message(): self.unique_id = unique_id # The plugin object ID issueing the message self.task_id = task_id # The plugin object ID of the task self.scheduler = scheduler # Whether this is a scheduler level message - + self.sequence_id = sequence_id # Unique ID for a task, so we can track all messages per task if message_type in (MessageType.SUCCESS, MessageType.FAIL): assert(elapsed is not None) |