Closed Bug 486793 Opened 12 years ago Closed 12 years ago
Unit tests: Add capability to easily profile a test
I would like to be able to do something like: StartProfiling("MyTestcase"); RunTestcase(); StopProfiling(); Initially, I only care about Shark, but it should be easy to add support for other profilers that provide programmatic hooks.
I used this patch to generate the profile in bug 456272.
Comment on attachment 371002 [details] [diff] [review] Add StartProfiling() and StopProfiling() to TestHarness.h I'm a little unhappy about the makefile FLAGS changes, because they are localized to xpcom/tests, when TestHarness.h could/should be used other places. Can we just add those flags globally when shark is enabled?
Moved setting of OS X framework flags to config.mk.
Attachment #371002 - Attachment is obsolete: true
Attachment #371949 - Flags: review?(benjamin)
jsdbgapi.h has the same code... can we share?
Sharing might be hard... they are in different build systems and are very difficult to link back together.
Pushed http://hg.mozilla.org/mozilla-central/rev/7be0087c83ca Chris Jones - bug 486793: add programmatic control of profiler to xpcom unit tests. r=bsmedberg
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Version: unspecified → Trunk
Attachment #426902 - Flags: review?(bugspam.Callek) → review+
Comment on attachment 426902 [details] [diff] [review] (Bv1-CC) Copy it to comm-central [Checkin: Comment 9] http://hg.mozilla.org/comm-central/rev/36643bb71021 I wonder how this patch ended up with "From: Paolo Amadini ..." :-/
Attachment #426902 - Attachment description: (Bv1-CC) Copy it to comm-central → (Bv1-CC) Copy it to comm-central [Checkin: Comment 9]
You need to log in before you can comment on or make changes to this bug.