Bug 155723 - Update benchmark tests
Summary: Update benchmark tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Lee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-21 10:51 PDT by Jon Lee
Modified: 2016-03-21 17:30 PDT (History)
5 users (show)

See Also:


Attachments
1. Merge text tests (9.37 KB, patch)
2016-03-21 11:02 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
2. Clean up miscellaneous test suite. (15.81 KB, patch)
2016-03-21 11:02 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
3. Move compositing transforms test. (9.68 KB, patch)
2016-03-21 11:03 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
4. Move 3D suite. (2.12 KB, patch)
2016-03-21 11:03 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
5. Add canvas tests that include all stroke and fill paths. (5.35 KB, patch)
2016-03-21 11:03 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
6. Add a helper method. (8.16 KB, patch)
2016-03-21 11:04 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
7. Add quadratic and bezier segments. (11.18 KB, patch)
2016-03-21 11:04 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
Patch (47.56 KB, patch)
2016-03-21 11:07 PDT, Jon Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2016-03-21 10:51:39 PDT
Condense some of the tests, and remove redundant ones. Enhance the master suite.
Comment 1 Jon Lee 2016-03-21 11:02:32 PDT
Created attachment 274604 [details]
1. Merge text tests
Comment 2 Jon Lee 2016-03-21 11:02:51 PDT
Created attachment 274605 [details]
2. Clean up miscellaneous test suite.
Comment 3 Jon Lee 2016-03-21 11:03:08 PDT
Created attachment 274606 [details]
3. Move compositing transforms test.
Comment 4 Jon Lee 2016-03-21 11:03:26 PDT
Created attachment 274607 [details]
4. Move 3D suite.
Comment 5 Jon Lee 2016-03-21 11:03:50 PDT
Created attachment 274608 [details]
5. Add canvas tests that include all stroke and fill paths.
Comment 6 Jon Lee 2016-03-21 11:04:05 PDT
Created attachment 274609 [details]
6. Add a helper method.
Comment 7 Jon Lee 2016-03-21 11:04:22 PDT
Created attachment 274610 [details]
7. Add quadratic and bezier segments.
Comment 8 Jon Lee 2016-03-21 11:07:17 PDT
Created attachment 274611 [details]
Patch
Comment 9 Said Abou-Hallawa 2016-03-21 13:31:00 PDT
Comment on attachment 274611 [details]
Patch

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

> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:87
> +        this.color = colors[Math.floor(Pseudo.random() * colors.length)];

Can't we use Stage.randomElementInArray() here?

> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:95
> +            nextPoint = this.randomPoint(stage, new Point(this.gridSizeX / 2, this.gridSizeY / 2));

this.gridSize.center() can be if this.gridSize is defined as a Point object.

> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:101
> +    gridSizeY: 40,

Should we use a point object instead of two variables?

> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:123
> +        var y = (coordinate.y + .5) * stage.size.y / (this.gridSizeY + 1);

What is the need for adding .5 to coordinate.x and coordinate.y? And why do we add 1 to this.gridSizeX and this.gridSizeY?

Can't we cache the value: gridCells = stage.size.divide(gridSize) and use it instead of this.gridSizeX and this.gridSizeY?

> PerformanceTests/Animometer/tests/master/resources/text.js:26
> +    ],

Do we need to add a class for Color? I think this array would be more readable if it is written as array of color pairs.
Comment 10 Jon Lee 2016-03-21 17:25:15 PDT
Comment on attachment 274611 [details]
Patch

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

>> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:87
>> +        this.color = colors[Math.floor(Pseudo.random() * colors.length)];
> 
> Can't we use Stage.randomElementInArray() here?

Done.

>> PerformanceTests/Animometer/tests/master/resources/canvas-tests.js:123
>> +        var y = (coordinate.y + .5) * stage.size.y / (this.gridSizeY + 1);
> 
> What is the need for adding .5 to coordinate.x and coordinate.y? And why do we add 1 to this.gridSizeX and this.gridSizeY?
> 
> Can't we cache the value: gridCells = stage.size.divide(gridSize) and use it instead of this.gridSizeX and this.gridSizeY?

As I say in the Changelog, it's to scale down the whole thing a little bit so that you can see the full stroke along the edges of the grid.

I can move these numbers into stage.

>> PerformanceTests/Animometer/tests/master/resources/text.js:26
>> +    ],
> 
> Do we need to add a class for Color? I think this array would be more readable if it is written as array of color pairs.

It would probably be good to add.
Comment 11 Jon Lee 2016-03-21 17:30:59 PDT
Committed r198509: <http://trac.webkit.org/changeset/198509>