Bug 54074 - nrwt multiprocessing: add in per-worker, per-shard stats
Summary: nrwt multiprocessing: add in per-worker, per-shard stats
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Dirk Pranke
URL:
Keywords:
Depends on: 54072
Blocks: 49566
  Show dependency treegraph
 
Reported: 2011-02-09 00:32 PST by Dirk Pranke
Modified: 2011-02-14 14:15 PST (History)
4 users (show)

See Also:


Attachments
Patch (3.65 KB, patch)
2011-02-09 00:34 PST, Dirk Pranke
no flags Details | Formatted Diff | Diff
merge in changes from 54070, 54071, 54072, update w/ ojan's feedback (3.71 KB, patch)
2011-02-11 18:13 PST, Dirk Pranke
tony: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Pranke 2011-02-09 00:32:00 PST
nrwt multiprocessing: add in per-worker, per-shard stats
Comment 1 Dirk Pranke 2011-02-09 00:34:41 PST
Created attachment 81764 [details]
Patch
Comment 2 Ojan Vafai 2011-02-09 13:54:00 PST
Comment on attachment 81764 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=81764&action=review

Just a couple minor things.

> Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:157
> +        thread_timings = [w.stats for w in self._workers.values()]

s/w/worker

> Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:218
> +    def _update_worker_stats(self, src, result, elapsed_time):

You don't use result here.
Comment 3 Dirk Pranke 2011-02-11 18:13:28 PST
Created attachment 82219 [details]
merge in changes from 54070, 54071, 54072, update w/ ojan's feedback
Comment 4 Tony Chang 2011-02-14 13:33:47 PST
Comment on attachment 82219 [details]
merge in changes from 54070, 54071, 54072, update w/ ojan's feedback

View in context: https://bugs.webkit.org/attachment.cgi?id=82219&action=review

> Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:62
> +        self.stats = {}
> +        self.stats['name'] = worker_connection.name
> +        self.stats['num_tests'] = 0
> +        self.stats['total_time'] = 0

Nit: I would declare this inline, but I don't feel strongly about it.  Someday we should convert this to a class.
self.stats = {
    'name': worker_connection.name,
    'num_tests': 0,
    'total_time': 0,
}

> Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:211
> +        self._group_stats[list_name] = (num_tests, elapsed_time)
>          pass

Remove 'pass'
Comment 5 Dirk Pranke 2011-02-14 13:51:20 PST
(In reply to comment #4)
> (From update of attachment 82219 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=82219&action=review
> 
> > Tools/Scripts/webkitpy/layout_tests/layout_package/test_runner2.py:62
> > +        self.stats = {}
> > +        self.stats['name'] = worker_connection.name
> > +        self.stats['num_tests'] = 0
> > +        self.stats['total_time'] = 0
> 
> Nit: I would declare this inline, but I don't feel strongly about it.  Someday we should convert this to a class.
> self.stats = {
>     'name': worker_connection.name,
>     'num_tests': 0,
>     'total_time': 0,
> }
> 

There's actually no good reason to keep this a separate data structure rather than just hanging the fields directly off of WorkerState, but I didn't want to mess with the surrounding code. I will merge that in a subsequent patch after all of this other stuff lands.
Comment 6 Dirk Pranke 2011-02-14 14:15:58 PST
Committed r78507: <http://trac.webkit.org/changeset/78507>