Bug 179825 - Add a TimingScope class for microbenchmarking sections of code
Summary: Add a TimingScope class for microbenchmarking sections of code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Template Framework (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-11-17 10:03 PST by Simon Fraser (smfr)
Modified: 2017-11-17 15:01 PST (History)
7 users (show)

See Also:


Attachments
Patch (11.05 KB, patch)
2017-11-17 10:07 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2017-11-17 10:03:15 PST
I keep writing code that computes the duration taken by a chunk of code, averaging over some number of calls and printing the result using WTFLogAlways. This should be wrapped in stack-based helper class.
Comment 1 Simon Fraser (smfr) 2017-11-17 10:07:03 PST
Created attachment 327189 [details]
Patch
Comment 2 Simon Fraser (smfr) 2017-11-17 10:08:02 PST
Maybe this and B3TimingScope should share code at some point, but I don't think that's necessary for a small utility class right now.
Comment 3 EWS Watchlist 2017-11-17 10:08:33 PST
Attachment 327189 [details] did not pass style-queue:


ERROR: Source/WTF/wtf/TimingScope.cpp:67:  More than one command on the same line  [whitespace/newline] [4]
Total errors found: 1 in 5 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 WebKit Commit Bot 2017-11-17 15:00:47 PST
Comment on attachment 327189 [details]
Patch

Clearing flags on attachment: 327189

Committed r224990: <https://trac.webkit.org/changeset/224990>
Comment 5 WebKit Commit Bot 2017-11-17 15:00:48 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Radar WebKit Bug Importer 2017-11-17 15:01:31 PST
<rdar://problem/35624957>