Bug 65223 - JSC command-line tool does not come with any facility for measuring time precisely
Summary: JSC command-line tool does not come with any facility for measuring time prec...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 17:23 PDT by Filip Pizlo
Modified: 2011-07-26 19:56 PDT (History)
3 users (show)

See Also:


Attachments
the patch (2.64 KB, patch)
2011-07-26 17:26 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (changed function name) (2.63 KB, patch)
2011-07-26 17:50 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-07-26 17:23:53 PDT
The only facility for measuring time is Date, which clips and truncates the time.  Internally, JSC has access to the most precise available method on any given OS.  For profiling and benchmarking, it would be useful if the jsc command-line tool exposed this functionality to JavaScript programs.
Comment 1 Filip Pizlo 2011-07-26 17:26:42 PDT
Created attachment 102079 [details]
the patch
Comment 2 Geoffrey Garen 2011-07-26 17:31:58 PDT
Comment on attachment 102079 [details]
the patch

Seems like the JS name should be "preciseTime" to match the C++ name.
Comment 3 Filip Pizlo 2011-07-26 17:50:11 PDT
Created attachment 102085 [details]
the patch (changed function name)

Good point, changed the name to preciseTime().
Comment 4 Gavin Barraclough 2011-07-26 17:56:50 PDT
Comment on attachment 102085 [details]
the patch (changed function name)

To nitpick the change log is now wrong, but I don't think anyone is going to be confused by this patch, so r+.
Comment 5 WebKit Review Bot 2011-07-26 19:56:37 PDT
Comment on attachment 102085 [details]
the patch (changed function name)

Clearing flags on attachment: 102085

Committed r91817: <http://trac.webkit.org/changeset/91817>
Comment 6 WebKit Review Bot 2011-07-26 19:56:42 PDT
All reviewed patches have been landed.  Closing bug.