Skip to content
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 #179

Closed
schwernbot opened this issue Mar 16, 2014 · 1 comment
Closed

Remove storage of events and results from History #179

schwernbot opened this issue Mar 16, 2014 · 1 comment

Comments

@schwernbot
Copy link

From: @schwern
Date: Monday Nov 14, 2011 at 02:45 GMT
Orig: Test-More/test-more#198

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.

@schwernbot
Copy link
Author

From: @schwern
Date: Monday Jun 18, 2012 at 22:04 GMT
Orig: Test-More/test-more#198 (comment)

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
Projects
None yet
Development

No branches or pull requests

2 participants