zazi1991i / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

Feature request: arbirtary vertical lines #35

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Another request we would find useful is the ability to draw some arbitrary 
vertical lines next to the DOMready and onLoad lines. Now this may get a bit 
more complex: We would like to inject that value in the har file in the pages 
sections for each page load (just like DOMready and onLoad). Since the 
pages->pageTimings contains values that could easily be drawn this way, do you 
think that some external function call could notify that har viewer that a new 
metric should be also drawn along with DOMready and onLoad ?

Something like:

                "pageTimings": {
                    "myNewMetric": 3444 // my custom metric
                    "onLoad": 17419, // standard values 
                    "onContentLoad": 13948 // standard values 
                },

and then:

HARViewerOptions = {'drawable_metrics': ['myNewMetric']}

roughly, you get the idea. And maybe add some color there too :)

Thats it

Original issue reported on code.google.com by phobouli...@gmail.com on 23 Feb 2011 at 9:45

GoogleCodeExporter commented 8 years ago
Good point, another event that could be also displayed is mozAfterPaint 
(already displayed by Firebug)

Honza

Original comment by odva...@gmail.com on 23 Feb 2011 at 11:20

GoogleCodeExporter commented 8 years ago
Patch committed at R231

Yet missing:
- High level APIs (for easy customization)
- Documentation (wiki)
- Example HAR file with custom page timings (perhaps MozAfterPaint)

Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 8:28

GoogleCodeExporter commented 8 years ago
High level API committed at R236

An example of a HAR file:

"pageTimings": {
    "onContentLoad": 5605, 
    "onLoad": 6964,
    "_onMyEvent": 4000
}, 

An example index.php file customization

$("#content").bind("onViewerPreInit", function(event)
{
    // Get application object
    var viewer = event.target.repObject;

    // Make sure stats and timeline is visible
    // to the user by default
    var preview = viewer.getTab("Preview");

    // Add custom page timing displayed as a vertical line
    // over request in the first phase.
    preview.addPageTiming({
        name: "_onMyEvent",
        description: "A custom page timing"
    });
});

Wiki updated:
http://code.google.com/p/harviewer/wiki/Customization?ts=1299781191&updated=Cust
omization

Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 6:21

GoogleCodeExporter commented 8 years ago
Yet missing:
- Example HAR file with custom page timings (perhaps MozAfterPaint) + example 
index-customized.php file
- Timing tooltip must dynamically generate the section with page timings (this 
is why there is a description field when registering a new timing)
- Selenium test for the new APIs.

Honza

Original comment by odva...@gmail.com on 10 Mar 2011 at 6:24

GoogleCodeExporter commented 8 years ago
Patch for the timing tooltip (info tip) committed at R239
Honza

Original comment by odva...@gmail.com on 11 Mar 2011 at 6:55

GoogleCodeExporter commented 8 years ago
Patch for proper phase-end calculation. This forces the event being displayed 
in the waterfall graph event if it happens after all requests.
Honza

Original comment by odva...@gmail.com on 11 Mar 2011 at 7:19

GoogleCodeExporter commented 8 years ago
Forgot to note: Comment 6 is related to R240
Honza

Original comment by odva...@gmail.com on 12 Mar 2011 at 12:10

GoogleCodeExporter commented 8 years ago
Test committed at R249
Honza

Original comment by odva...@gmail.com on 12 Mar 2011 at 8:36

GoogleCodeExporter commented 8 years ago
This is one of 7 issues fixed in HAR Viewer 2.0.8

You can check online:
http://www.softwareishard.com/har/viewer/

Or download a distribution package here:
http://code.google.com/p/harviewer/downloads/list

Please verify

Thanks for the report!
Honza

Original comment by odva...@gmail.com on 13 Mar 2011 at 8:15