New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove storage of events and results from History #198
Comments
ghost
assigned schwern
May 11, 2012
schwern
added a commit
that referenced
this issue
May 26, 2012
…ventStorage object. Then we can add an EventStorage that throws out events. This was the last use of TB2::Stack and TB2::StackBuilder, so they're removed. For #198
schwern
added a commit
that referenced
this issue
May 26, 2012
schwern
added a commit
that referenced
this issue
May 26, 2012
schwern
added a commit
that referenced
this issue
May 26, 2012
Also test that things work with event storage off. Not terribly well tested right now. For #198
schwern
added a commit
that referenced
this issue
May 26, 2012
So the user sees their own call to TB2::History not inside TB2::History. For #198
schwern
added a commit
that referenced
this issue
May 26, 2012
Things which are needed: 1) A way to turn on storage in use Test::More Test::Builder->create 2) Better docs about how to use (or not use) Test::Builder->results, events and Test::More summary and details. For #198
schwern
added a commit
that referenced
this issue
May 26, 2012
* Move all the count attributes together * Remove a now irrelevant comment For #198
Complete. I decided to use a storage object rather than a role. Per-object roles might not make it after Mouse gets torn out and they might have performance issues. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ideally, TB2 should consume O(1) memory no matter how many results are run. This cannot be true if History stores events and results. To satisfy this, History keeps statistics and there is the TB2::NoHistory subclass which does not store events.
Unfortunately, when something is passed a "History" object, it might be NoHistory and thus some methods might not be safe to use. This is awkward. The relationship should be inverted. TB2::History should only keep statistics. A subclass or role or even separate watcher should store roles and events.
Change Test::Builder2::History to only store event statistics. Add whatever methods are necessary to make History useful to all its current users.
Write a role which stores events and results. Make sure there's a hook in
History->accept_event
to store the event if$self
does the role.The text was updated successfully, but these errors were encountered: