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)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jmaher, Assigned: parkouss)

References

Details

Attachments

(1 file)

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.
Attached patch 891907.patchSplinter Review
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.
Assignee: nobody → j.parkouss
Status: NEW → ASSIGNED
Attachment #8646471 - Flags: review?(jmaher)
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+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Blocks: 1195291
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: