Bug 158050 - [JSC] Allow JSBench to use precise time
Summary: [JSC] Allow JSBench to use precise time
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-24 19:27 PDT by Yusuke Suzuki
Modified: 2016-05-26 17:39 PDT (History)
10 users (show)

See Also:


Attachments
Patch (26.04 KB, patch)
2016-05-24 19:58 PDT, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (46.38 KB, patch)
2016-05-26 03:34 PDT, Yusuke Suzuki
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuke Suzuki 2016-05-24 19:27:05 PDT
[JSC] Allow JSBench to use precise time
Comment 1 Yusuke Suzuki 2016-05-24 19:58:02 PDT
Created attachment 279736 [details]
Patch
Comment 2 Geoffrey Garen 2016-05-25 09:46:27 PDT
Comment on attachment 279736 [details]
Patch

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

> Tools/Scripts/run-jsc-benchmarks:1034
> +      doublePuts($stderr,file,"function currentTimeInMS(msg)")

Perhaps I missed it, but I don't see an implementation of currentTimeInMS outside the run-jsc-benchmarks script. We'd like these tests to support running in DRT or Safari as well. Can you add an implementation of currentTimeInMS to harness.html? performance.now() is probably the best thing to use in the browser.
Comment 3 Yusuke Suzuki 2016-05-26 03:29:56 PDT
Comment on attachment 279736 [details]
Patch

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

>> Tools/Scripts/run-jsc-benchmarks:1034
>> +      doublePuts($stderr,file,"function currentTimeInMS(msg)")
> 
> Perhaps I missed it, but I don't see an implementation of currentTimeInMS outside the run-jsc-benchmarks script. We'd like these tests to support running in DRT or Safari as well. Can you add an implementation of currentTimeInMS to harness.html? performance.now() is probably the best thing to use in the browser.

Oh, thanks! I thought these tests are only used from run-jsc-benchmark.
I've added currentTimeInMS implementaiton in JSBench/harness.js and each html files.
HTML files implementation is required when it is not executed under the harness.
If it is executed in JSBench's harness, harness.js's implementation is required.
And run-jsc-benchmark's implementation is required when it is executed with run-jsc-benchmark.
Comment 4 Yusuke Suzuki 2016-05-26 03:34:17 PDT
Created attachment 279875 [details]
Patch
Comment 5 Geoffrey Garen 2016-05-26 12:28:18 PDT
Comment on attachment 279875 [details]
Patch

r=me
Comment 6 Yusuke Suzuki 2016-05-26 17:39:04 PDT
Committed r201442: <http://trac.webkit.org/changeset/201442>