You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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.The text was updated successfully, but these errors were encountered: