Bug 54074

Summary: nrwt multiprocessing: add in per-worker, per-shard stats
Product: WebKit Reporter: Dirk Pranke <dpranke>
Component: New BugsAssignee: Dirk Pranke <dpranke>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, mihaip, ojan, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on: 54072    
Bug Blocks: 49566    
Attachments:
Description Flags
Patch
none
merge in changes from 54070, 54071, 54072, update w/ ojan's feedback tony: review+

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>