On Mar 17, 8:28 pm, Michele <[email protected]> wrote:
> Okay so I managed to figure out how to get at that line in the net
> panel, but I'm still having issues.  Code can be 
> found:http://pastebin.com/mq5yAhPz
> and I'm referencing this version of 
> net.js:http://getfirebug.com/developer/api/firebug1.7X/symbols/src/content_f...
> This time there are no console errors, so I'm logging to the firebug
> console to keep track of what is causing problems.
>
> The issues I'm currently seeing are two-fold.
>
> Firstly, when this starts up initially, the logs on lines 3, 6, 9, 12
> and 15 all print. Nothing after line 17 is executed. If I comment out
> 17 and 18, then my first split function seems to be the issue, because
> nothing else gets written to the log.
>
> These probably have to do with the version of firebug I'm running
> (1.7X.0b1)? Or is there something special about the cache and timings
> columns that I should know about?
>
> I'll play with my split function a bit more to get that nailed down.
> Also, the requests always come back as a - even though there are
> requests. I have no idea what's causing this. Any ideas?
>
> Secondly, when I refresh the page, or navigate to another, I don't
> even get as far as getting the row. Line 6 fires off, but then line 9
> never does. Any ideas what could cause this?
Perhaps too soon?

> Should I be getting an
> instance of the net panel once and then using it throughout each page
> load?
No, the Net panel UI is generated again when page load happens.

> Lastly, if you have any suggestions on how to do this better, please
> let me know. I can see the variables listed in updateSummary, but I
> really have no clue how to access those, and that would be much easier
> than getting them out of the table after they've been nicely
> formatted.
Agree, so my proposal is, please create a new bug report and list all
values you
want to get from the Net panel (e.g. all in the summary row I guess)

We should design an APIs directly for it. For example:

var netPanel = context.getPanel("net");
var summary = netPanel.getSummary();

console.log("number of requests: " + summary.requestCount + ", total
size: " +
   summary.totalSize + ", from cache: " + summary.fromCacheSize + ",
timings: " + ...

Honza

>
> Michele
>
> On Mar 14, 10:14 am, Michele <[email protected]> wrote:
>
>
>
>
>
>
>
> > >> In NetExporter, you manually calculate the load times, rather than
> > >> getting those from something provided.
> > >No, it gets all the timing info from the net panel and adapts to
> > >HAR (the output format) needs.
>
> > From the code that I've seen, it does its own calculations. Then
> > again, this is so abstracted that I generally loose my place when I go
> > 3-4 levels up, or I hit a dead-end. If there's any code that
> > references the net panel, it's not only difficult to find, but is far
> > too difficult for a beginner, like me, to pick out of all the
> > surrounding code and be able to understand.
>
> > > See, net.js, updateSummaries() method. The results value is stored
> > > in the UI and you could get it from there.
>
> > That is what I've been looking for this entire time! But how do I
> > access this from my code? Assume I know nothing, and please don't
> > point me back to NetExporter, it's not helping me at all.
>
> > > On Mar 11, 8:15 pm, Michele <[email protected]> wrote:> I'm trying 
> > > to setup listeners for two events: the page starts loading,
> > > > and the page finishes loading.
>
> > > That's exactly what NetExport does. See for example how
> > > page.startedDateTime field
> > > is computed in harBuilder.js
>
> > I've looked at this before. The examples you keep giving me lack
> > context, so while I see the code and understand that you start timing
> > at 0 and then populate it and use it later, I have no guidance on how
> > to apply that in any other situation. From what I can tell you use
> > buildPageTimings on every file because its called inside the
> > buildEntry function, so I don't know how that helps me figure out when
> > the page is loaded. The few things I've been able to find all point to
> > adding an event listener for the content loaded event, and not doing
> > any calculations myself.
>
> > > > If the initialization method is not the
> > > > place to do that, where is?
>
> > > The initialization is perfectly suitable for this. Just just need to
> > > implement
> > > the constructor function for NetListener. There is an exception on
> > > line 67.
> > > "NetListener is not defined"
>
> > Thanks for pointing that out. I never look at the error
> > console...Anyways, if I'm getting my information directly from the Net
> > Panel (which was my original objective, but there is absolutely no
> > documentation on how to get that information so I assumed it wasn't
> > possible) then I shouldn't need a netlistener at all? It's strange
> > that that throws an error though. I followed all the instructions to
> > the letter...
>
> > Thanks
> > Michele

-- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en.

Reply via email to