summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJames E. Blair <jim@acmegating.com>2022-07-09 16:22:28 -0700
committerJames E. Blair <jim@acmegating.com>2022-07-09 16:24:27 -0700
commitdcc4c21aef0abf694db1325092fb0ab3486402f2 (patch)
treeb114ffac1deed690e4178c991483a7c524376b8b /doc
parentcce45ec1dd4b526c75e3d0d5e65b647a1deafcbb (diff)
downloadzuul-dcc4c21aef0abf694db1325092fb0ab3486402f2.tar.gz
Add dev docs for metrics
As a developer, it's hard to visualize how the statsd metrics are related to the sequence of actions taken during pipeline processing. This adds a developer documentation page with a table that shows the pipeline processing steps, then groups them together and shows which metrics represent those steps. It also indicates where timestamps are stored on objects to form the basis of elapsed times in the metrics. Change-Id: I7180bdfb73e14cc67718ecdc6446edb5a24d00ed
Diffstat (limited to 'doc')
-rw-r--r--doc/source/developer/index.rst1
-rw-r--r--doc/source/developer/metrics.rst74
2 files changed, 75 insertions, 0 deletions
diff --git a/doc/source/developer/index.rst b/doc/source/developer/index.rst
index 52266a175..b45c75640 100644
--- a/doc/source/developer/index.rst
+++ b/doc/source/developer/index.rst
@@ -14,6 +14,7 @@ Zuul, though advanced users may find it interesting.
drivers
triggers
testing
+ metrics
docs
ansible
javascript
diff --git a/doc/source/developer/metrics.rst b/doc/source/developer/metrics.rst
new file mode 100644
index 000000000..913a591ba
--- /dev/null
+++ b/doc/source/developer/metrics.rst
@@ -0,0 +1,74 @@
+:title: Metrics
+
+Metrics
+=======
+
+Event Overview
+--------------
+
+The following table illustrates the event and pipeline processing
+sequence as it relates to some of the metrics described in
+:ref:`statsd`. This is intended as general guidance only and is not
+an exhaustive list.
+
++----------------------------------------+------+------+------+--------------------------------------+
+| Event | Metrics | Attribute |
++========================================+======+======+======+======================================+
+| Event generated by source | | | | event.timestamp |
++----------------------------------------+------+ + +--------------------------------------+
+| Enqueued into driver queue | | | | |
++----------------------------------------+------+ + +--------------------------------------+
+| Enqueued into tenant trigger queue | | | | event.arrived_at_scheduler_timestamp |
++----------------------------------------+ + [8] + +--------------------------------------+
+| Forwarded to matching pipelines | [1] | | | |
++----------------------------------------+ + + +--------------------------------------+
+| Changes enqueued ahead | | | | |
++----------------------------------------+ + + +--------------------------------------+
+| Change enqueued | | | | item.enqueue_time |
++----------------------------------------+------+------+ +--------------------------------------+
+| Changes enqueued behind | | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Set item configuration | | | | build_set.configured_time |
++----------------------------------------+------+------+ +--------------------------------------+
+| Request files changed (if needed) | | | | |
++----------------------------------------+ +------+ +--------------------------------------+
+| Request merge | [2] | | | |
++----------------------------------------+ +------+ +--------------------------------------+
+| Wait for merge (and files if needed) | | | [9] | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Generate dynamic layout (if needed) | [3] | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Freeze job graph | [4] | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Request global repo state (if needed) | | | | build_set.repo_state_request_time |
++----------------------------------------+ [5] +------+ +--------------------------------------+
+| Wait for global repo state (if needed) | | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Deduplicate jobs | | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Acquire semaphore (non-resources-first)| | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Request nodes | | | | request.created_time |
++----------------------------------------+ [6] +------+ +--------------------------------------+
+| Wait for nodes | | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Acquire semaphore (resources-first) | | | | |
++----------------------------------------+------+------+ +--------------------------------------+
+| Enqueue build request | | | | build.execute_time |
++----------------------------------------+ [7] +------+ +--------------------------------------+
+| Executor starts job | | | | build.start_time |
++----------------------------------------+------+------+------+--------------------------------------+
+
+====== =============================
+Metric Name
+====== =============================
+1 event_enqueue_processing_time
+2 merge_request_time
+3 layout_generation_time
+4 job_freeze_time
+5 repo_state_time
+6 node_request_time
+7 job_wait_time
+8 event_enqueue_time
+9 event_job_time
+====== =============================