Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Make the timers available on the before_beacon event #13

Open
hanoii opened this issue Mar 18, 2011 · 2 comments
Open

Make the timers available on the before_beacon event #13

hanoii opened this issue Mar 18, 2011 · 2 comments

Comments

@hanoii
Copy link
Contributor

hanoii commented Mar 18, 2011

I was working to create a visualization similar to the episodes framework, not sure if you've seen it, but it's a graphic timeline of the timers, with an idea of where along the timeline each timer was started and its duration.

I noticed that right now, the only thing I have on the before_beacon event is the vars, which I admin it's about the only information useful for statistics, but I wonder what harm could it make to make a little bit more things available to it?

I am talking specifically about.
// If we reach here, all plugins have completed
impl.fireEvent("before_beacon", impl.vars);

What about making the whole impl object available?

Probably a bit too much, and what about making also impl.timers available?

Something like:
// If we reach here, all plugins have completed
impl.fireEvent("before_beacon", impl.vars, impl.timers);

I don't mind rolling a patch on my fork, but may for this one it was worth the question first.

@bluesmoon
Copy link
Contributor

yeah, I'd rather not send in the entire impl object, since it could be modified, but it may be fine to send in the timers object as well. You can send in a patch, or I'll get to it in time.

@hanoii
Copy link
Contributor Author

hanoii commented Apr 7, 2011

I was trying to submit a patch to this, however it has proven to be a little more complicated that I first thought. timers is not on that impl.object because it's only on the impl object of the rt plugin.

I am not sure what's the best approach to do here. One of the reasons I'd like to have the timers, which is kind of selfish reason, is because I like the visualization the episodes framework gives in a way it creates a timeline of events, so with the timers I would be able to build that, still like to have it, so..

  1. One option might be to add the timers object directly as a var and then have the beacon function ignore object vars when building the actual beacon. (not very elegant).
  2. Another option might be to have a whole different repository of data instead of vars, such as impl.extra, or impl.data and have a function analog to addVar called addData in which the plugins can add Data to it, and that object will also be passed along to the before_beacon timer or any other place where this can be handy.

Just thinking out loud a bit, if you actually like one of these let me know and I'll try to work on it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants