Closed
Bug 891907
Opened 12 years ago
Closed 10 years ago
in talos, counter manager instantiation, management, and cleanup is not intuitive or well written
Categories
(Testing :: Talos, defect)
Testing
Talos
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jmaher, Assigned: parkouss)
References
Details
Attachments
(1 file)
13.62 KB,
patch
|
jmaher
:
review+
|
Details | Diff | Splinter Review |
there is some basic cleanup we can do and probably a series of other actions. From bug 875914, jhammel has a good recommendation for cleaning up counters:
::: talos/ttest.py
@@ +436,5 @@
>
> + except talosRegression, tr:
> + counter = None
> + if 'cm' in vars():
> + counters = cm
counters = vars().get('cm', counters)
That said,
A. this is repeat code
B. the whole thing is a bit of an anti-pattern; AIUI,
- 'counters' is a list of counters; cm is a counter manager that is instantiated only if counters is non empty: http://hg.mozilla.org/build/talos/file/a11542b55a70/talos/ttest.py#l361
- so, we strangely look in vars() which is probably wrong anyway since counters could be per test, at least in theory
C. the right way to do this is just to fix cm to be None per test if counters is not none
We should really put a few hours into cleaning up the counters code so it is better integrated and easier to work with in the future.
Assignee | ||
Comment 1•10 years ago
|
||
This patch hide the counter complexity. I tried locally by activating linux counters on tresize, this seems to give me the same kind of results.
Note that this patch should be applied on top of the patch in bug 1190376.
Reporter | ||
Comment 2•10 years ago
|
||
Comment on attachment 8646471 [details] [diff] [review]
891907.patch
Review of attachment 8646471 [details] [diff] [review]:
-----------------------------------------------------------------
this is nice and simple, thanks!
Attachment #8646471 -
Flags: review?(jmaher) → review+
Assignee | ||
Comment 3•10 years ago
|
||
Assignee | ||
Comment 4•10 years ago
|
||
All green - landed:
https://hg.mozilla.org/build/talos/rev/7fe8298e0aa2
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•