Commit 3daf2eb
authored
[Monitoring] Enrich UNTRIAGED_TESTCASE_AGE metric to track testcases stuck in analyze (#4547)
### Motivation
We currently have no way to tell if analyze task was successfully
executed. The TESTCASE_UPLOAD_TRIAGE_DURATION metric from #4364 would
only track duration for tasks that did finish.
An analyze_pending field is added to the Testcase entity in datastore,
which is set to False by default, to True for manually uploaded
testcases, and to False once analyze task postprocess runs.
It also increments the UNTRIAGED_TESTCASE_AGE metric from #4381 with a
status label, so we can know at what step the testcase is stuck, thus
allowing us to alert if analyze is taking longer to finish than
expected.
The alert itself could be, for instance, P50 age of untriaged testcase
(status=analyze_pending) > 3h.
Also, this retroactively addresses comments from #4481:
* Fixes docstring for emit_testcase_triage_duration_metric
* Removes assertions
* Renames TESTCASE_UPLOAD_TRIAGE_DURATION to TESTCASE_TRIAGE_DURATION,
since it now accounts for fuzzer generated testcases
* Use a boolean "from_fuzzer" field, instead of "origin" string, in
TESTCASE_TRIAGE_DURATION1 parent 764e8fe commit 3daf2eb
File tree
6 files changed
+49
-55
lines changed- src/clusterfuzz/_internal
- bot/tasks/utasks
- common
- cron
- datastore
- metrics
6 files changed
+49
-55
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
552 | 552 | | |
553 | 553 | | |
554 | 554 | | |
| 555 | + | |
| 556 | + | |
555 | 557 | | |
556 | 558 | | |
557 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
| 34 | + | |
| 35 | + | |
51 | 36 | | |
52 | 37 | | |
53 | 38 | | |
54 | 39 | | |
55 | | - | |
| 40 | + | |
56 | 41 | | |
57 | 42 | | |
58 | 43 | | |
59 | 44 | | |
60 | | - | |
| 45 | + | |
61 | 46 | | |
62 | 47 | | |
63 | 48 | | |
64 | 49 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 50 | | |
71 | 51 | | |
72 | | - | |
| 52 | + | |
73 | 53 | | |
74 | 54 | | |
75 | | - | |
| 55 | + | |
76 | 56 | | |
77 | | - | |
| 57 | + | |
78 | 58 | | |
79 | | - | |
| 59 | + | |
80 | 60 | | |
81 | | - | |
| 61 | + | |
82 | 62 | | |
83 | 63 | | |
84 | 64 | | |
85 | 65 | | |
86 | | - | |
| 66 | + | |
87 | 67 | | |
88 | 68 | | |
89 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
| 260 | + | |
259 | 261 | | |
260 | 262 | | |
261 | 263 | | |
| |||
336 | 338 | | |
337 | 339 | | |
338 | 340 | | |
339 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
340 | 350 | | |
341 | | - | |
| 351 | + | |
342 | 352 | | |
343 | 353 | | |
344 | 354 | | |
345 | | - | |
| 355 | + | |
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
349 | 359 | | |
350 | 360 | | |
| 361 | + | |
351 | 362 | | |
352 | 363 | | |
353 | 364 | | |
354 | | - | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| |||
409 | 414 | | |
410 | 415 | | |
411 | 416 | | |
412 | | - | |
| 417 | + | |
413 | 418 | | |
414 | 419 | | |
415 | 420 | | |
| |||
432 | 437 | | |
433 | 438 | | |
434 | 439 | | |
435 | | - | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
436 | 444 | | |
437 | | - | |
438 | | - | |
| 445 | + | |
439 | 446 | | |
440 | 447 | | |
441 | 448 | | |
| |||
452 | 459 | | |
453 | 460 | | |
454 | 461 | | |
455 | | - | |
| 462 | + | |
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
459 | 466 | | |
460 | 467 | | |
461 | 468 | | |
462 | 469 | | |
463 | | - | |
| 470 | + | |
464 | 471 | | |
465 | 472 | | |
466 | 473 | | |
| |||
490 | 497 | | |
491 | 498 | | |
492 | 499 | | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | 500 | | |
499 | 501 | | |
| 502 | + | |
| 503 | + | |
500 | 504 | | |
501 | 505 | | |
502 | 506 | | |
| 507 | + | |
| 508 | + | |
503 | 509 | | |
504 | 510 | | |
505 | 511 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| |||
1380 | 1380 | | |
1381 | 1381 | | |
1382 | 1382 | | |
| 1383 | + | |
1383 | 1384 | | |
1384 | 1385 | | |
1385 | 1386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
586 | 590 | | |
587 | 591 | | |
588 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
235 | | - | |
| 234 | + | |
| 235 | + | |
236 | 236 | | |
237 | | - | |
| 237 | + | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
244 | | - | |
| 244 | + | |
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
| 368 | + | |
368 | 369 | | |
369 | 370 | | |
370 | 371 | | |
| |||
0 commit comments