Bug 30135 - Make InspectorTimelineAgent consistent with other components in Inspector.
Summary: Make InspectorTimelineAgent consistent with other components in Inspector.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-06 12:46 PDT by Kelly Norton
Modified: 2009-10-15 13:39 PDT (History)
2 users (show)

See Also:


Attachments
Removes TimelineAgent setting. (6.06 KB, patch)
2009-10-13 12:20 PDT, Kelly Norton
pfeldman: review-
Details | Formatted Diff | Diff
Updates the method names appropriately. (9.49 KB, patch)
2009-10-13 14:13 PDT, Kelly Norton
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly Norton 2009-10-06 12:46:01 PDT
== From pfeldman (https://bugs.webkit.org/show_bug.cgi?id=30028) ==

Given that you initialize m_timelineAgent in the setFrontendProxyObject, it
will only collect the data while inspector is
opened (has been opened for the page at least once in case of WebKit). Is it so
by design?

I am asking because Inspector uses a bit different models for existing types of
inspected objects:
1) It tracks resources iff tracking is enabled, regardless of the frontend
state. It then dumps all the data collected
into the frontend upon its availability. When user enables this tracking for
the first time, page reload takes place in
order to gather the data.
2) There are explicit "start/stop profiling" buttons that start/stop collecting
data and dump results into the profiler page.
We are currently extending profiling tab so that it could gather different
types of profiles.

I think you should choose one of the models above to look consistent within
WebKit. If you think some users can have
timeline agent turned on constantly (it produces minimal overhead, there are
times when user would like to see what
has been happening without reloading the page), you should go (1). Otherwise,
if you consider your agent to be of a
profiling nature, you should choose (2). (2) implies that timeline agent
results are presented as a profile result on the
profiles page.

We can chat about it and discuss the ways you will push the gathered
information further into your framework. I'll
be happy to help you out with the WebKit frontend piece as well.
Comment 1 Kelly Norton 2009-10-13 12:20:02 PDT
Created attachment 41117 [details]
Removes TimelineAgent setting.

This removes the setting for the TimelineAgent since there is no immediate need for it and it's shaping up to look more like profiling than resource tracking.

Pavel - Should I add anything else to the patch to make it consistent with the other components in InspectorController?
Comment 2 Pavel Feldman 2009-10-13 12:40:16 PDT
Comment on attachment 41117 [details]
Removes TimelineAgent setting.

> -void InspectorBackend::enableTimeline(bool always)
> +void InspectorBackend::enableTimeline()
>  {

If you are implementing profiler-alike operation, you should consider naming these accordingly. In the profiler world start/stopProfiling are the methods controlling profiler. enable/disableProfiler methods are only making sure JS engine is ready for the operation as a whole. I think you should name yours start/stopTimelineProfiler or similar. Note that you won't find start/stopProfiling methods in the inspector controller API since they are not used anywhere other than Web Inspector frontend. That's why they only present in InspectorBackend interface. There are start/stopUserInitiatedProfiling methods that inspector controller exposes to the clients instead. It is up to you whether to expose start/stopTimelineProfiler methods in InspectorController API or limit their visibility to the frontend.
Comment 3 Kelly Norton 2009-10-13 14:13:54 PDT
Created attachment 41125 [details]
Updates the method names appropriately.
Comment 4 Pavel Feldman 2009-10-14 09:22:23 PDT
Note that you should be adding bug id into the ChangeLog. Unfortunately I noticed it only after landing.

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/InspectorBackend.cpp
	M	WebCore/inspector/InspectorBackend.h
	M	WebCore/inspector/InspectorBackend.idl
	M	WebCore/inspector/InspectorController.cpp
	M	WebCore/inspector/InspectorController.h
	M	WebCore/inspector/InspectorFrontend.cpp
	M	WebCore/inspector/InspectorFrontend.h
	M	WebCore/inspector/front-end/TimelineAgent.js
Committed r49565
Comment 5 Eric Seidel (no email) 2009-10-15 13:39:07 PDT
Comment on attachment 41125 [details]
Updates the method names appropriately.

Removing cq? from this closed bug.