Skip to content

Commit 26a3e3d

Browse files
committed
PR Feedback; more accurate depiction of what happens to determine if a commit should be queued
1 parent 55cdaa0 commit 26a3e3d

File tree

1 file changed

+23
-26
lines changed

1 file changed

+23
-26
lines changed

docs/multiple-collectors.md

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,6 @@ The table below details a set of keywords, or a glossary of terms, that appear t
3535
| **Assigning a job** | The act of allocating one or more *jobs* to a collector. |
3636
| **website** | A standalone server responsible for inserting work into the queue. |
3737

38-
### Master artifacts
39-
40-
The website will go through all recent master commits, and check if they are done by looking at the `sha` and `status` column in the `benchmark_request` table.
41-
42-
- If the request is already marked as `completed`, nothing happens.
43-
- If the request is `in progress`, check [request completion](#Checking-request-completion).
44-
- If the request is `waiting for parent` commit benchmark to be completed, nothing happens.
45-
- If the request is missing, we will recursively find a set of parent master commits that are missing data (by looking at their status in `benchmark_request`).
46-
- If the set is non-empty, these commits will be handled recursively with the same logic as this commit.
47-
- If the set is empty, the request will be *enqueued*.
48-
49-
### Try artifacts
50-
51-
> The logic for try artifacts can either happen both in cron and in the GH webhook listener (that receives `@rust-timer queue/build` notifications), or only in cron.
52-
53-
The website will go through all try artifacts in `benchmark_request` that are not yet marked as `completed`.
54-
55-
- If the request is `waiting for artifacts`, do nothing (sometime later a GH notification will switch the status to `waiting for parent` once the artifacts are ready).
56-
- If the request is `waiting for parent`:
57-
- Recursively find a set of **grandparent** master commits that are missing data (by looking at their status in `benchmark_request`). This could happen on the edge switch from `waiting for artifacts` to `waiting for parent` in the GH webhook handler, or it could happen in each cron invocation.
58-
- If that set is empty, generate all necessary **parent** jobs and check if they are all completed in the `job_queue`.
59-
- If yes, *enqueue* the request.
60-
- If not, insert these jobs into the jobqueue. This is where backfilling happens, as we can backfill e.g. new backends for a parent master commit that was only benchmarked for LLVM before.
61-
- If the request is `in progress`, check [request completion](#Checking-request-completion).
62-
63-
6438
## Programs that need to be available
6539

6640
`perf` with `/proc/sys/kernel/perf_event_paranoid` set to -1 else the collector will panic. Setting this to 4 is a convenient way for testing error cases however.
@@ -115,6 +89,29 @@ Step 4:
11589

11690
The collectors health is monitored by updating a heartbeat column in the `collector_config` table. The UI will indicate the collector as offline if it is inactive for a specified period of time. This should be caught either by error logs or someone viewing the page and subsequently reporting the collector as offline in Zulip.
11791

92+
### Master artifacts
93+
94+
The website maintains a set of all master commits that have been completed in memory so it is able to quickly determine if the commit needs benchmarking.
95+
96+
- If the request's sha is in the benchmark index, nothing happens.
97+
- If the request is `in_progress`, check [request completion](#Checking-request-completion).
98+
- If the request is `waiting_for_parent` commit benchmark to be completed, nothing happens.
99+
- If the request is missing, we will recursively find a set of parent master commits that are missing data (by looking at their status in `benchmark_request`).
100+
- If the set is non-empty, these commits will be handled recursively with the same logic as this commit.
101+
- If the set is empty, the request will be *enqueued*.
102+
103+
### Try artifacts
104+
105+
The website will go through all try artifacts in `benchmark_request` that are not yet marked as `completed`.
106+
107+
- If the request is `waiting for artifacts`, do nothing (sometime later a GH notification will switch the status to `waiting for parent` once the artifacts are ready).
108+
- If the request is `waiting for parent`:
109+
- Recursively find a set of **grandparent** master commits that are missing data (by looking at their status in `benchmark_request`). This could happen on the edge switch from `waiting for artifacts` to `waiting for parent` in the GH webhook handler, or it could happen in each cron invocation.
110+
- If that set is empty, generate all necessary **parent** jobs and check if they are all completed in the `job_queue`.
111+
- If yes, *enqueue* the request.
112+
- If not, insert these jobs into the jobqueue. This is where backfilling happens, as we can backfill e.g. new backends for a parent master commit that was only benchmarked for LLVM before.
113+
- If the request is `in_progress`, check [request completion](#Checking-request-completion).
114+
118115
## Queue ordering
119116
The ordering of the queue is by priority, we assume that there is a collector online that is currently looking for work.
120117
- In progress requests, if there is a request that's state is `in_progress` the collector will take this request, for this to happen it presumably errored at some point and is restarting.

0 commit comments

Comments
 (0)