2010-08-13 Ojan Vafai <ojan@chromium.org>
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Aug 2010 17:34:51 +0000 (17:34 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Aug 2010 17:34:51 +0000 (17:34 +0000)
commit01d6d3ecb94e2f62ccf57f4514fd24efe2f88e8d
tree70b723449cc737c631e8ea4630d7cb7cfe2ab813
parent0eb66ecd171119c1da81881866f94d5d0ef70361
2010-08-13  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Darin Adler.

        add ability to test order-of-magnitude in layout tests
        https://bugs.webkit.org/show_bug.cgi?id=43997

        Uses the R^2 value to determine likelihood the performance
        is linear and then logs the x and y axis appropriately to determine
        log n and n^2 cases. These are all estimates though, so we try
        up to three times if we don't get the correct expected result.

        In practice, with the tests below, we almost always get the correct
        result, but sometimes the O(1) tests get registered as O(n) or indeterminate.

        * perf/array-binary-search-expected.txt: Added.
        * perf/array-binary-search.html: Added.
        * perf/array-nested-loop-expected.txt: Added.
        * perf/array-nested-loop.html: Added.
        * perf/array-push-pop-expected.txt: Added.
        * perf/array-push-pop.html: Added.
        * perf/array-reverse-expected.txt: Added.
        * perf/array-reverse.html: Added.
        * perf/object-keys-expected.txt: Added.
        * perf/object-keys.html: Added.
        * perf/set-attribute-expected.txt: Added.
        * perf/set-attribute.html: Added.
        * perf/typing-at-end-of-line-expected.txt: Added.
        * perf/typing-at-end-of-line.html: Added.
        * resources/magnitude-perf.js: Added.
        (Magnitude.description):
        (Magnitude._log):
        (Magnitude._debug):
        (Magnitude.run):
        (Magnitude._run):
        (Magnitude._rSquared):
        (Magnitude._logIterationInfo):
        (Magnitude._bigOGuess):
        (Magnitude._runIteration):
        (Magnitude):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@65614 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
LayoutTests/ChangeLog
LayoutTests/perf/array-binary-search-expected.txt [new file with mode: 0644]
LayoutTests/perf/array-binary-search.html [new file with mode: 0644]
LayoutTests/perf/array-nested-loop-expected.txt [new file with mode: 0644]
LayoutTests/perf/array-nested-loop.html [new file with mode: 0644]
LayoutTests/perf/array-push-pop-expected.txt [new file with mode: 0644]
LayoutTests/perf/array-push-pop.html [new file with mode: 0644]
LayoutTests/perf/array-reverse-expected.txt [new file with mode: 0644]
LayoutTests/perf/array-reverse.html [new file with mode: 0644]
LayoutTests/perf/object-keys-expected.txt [new file with mode: 0644]
LayoutTests/perf/object-keys.html [new file with mode: 0644]
LayoutTests/perf/set-attribute-expected.txt [new file with mode: 0644]
LayoutTests/perf/set-attribute.html [new file with mode: 0644]
LayoutTests/perf/typing-at-end-of-line-expected.txt [new file with mode: 0644]
LayoutTests/perf/typing-at-end-of-line.html [new file with mode: 0644]
LayoutTests/resources/magnitude-perf.js [new file with mode: 0644]