langfun 0.1.2.dev202511010804__py3-none-any.whl → 0.1.2.dev202511030805__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of langfun might be problematic. Click here for more details.
- langfun/core/eval/v2/runners_test.py +3 -0
- langfun/env/__init__.py +1 -1
- langfun/env/base_environment.py +62 -5
- langfun/env/base_environment_test.py +5 -5
- langfun/env/base_feature.py +38 -20
- langfun/env/base_feature_test.py +228 -0
- langfun/env/base_sandbox.py +27 -33
- langfun/env/base_sandbox_test.py +258 -251
- langfun/env/event_handlers/chain.py +58 -80
- langfun/env/event_handlers/chain_test.py +83 -111
- langfun/env/event_handlers/event_logger.py +77 -80
- langfun/env/event_handlers/event_logger_test.py +18 -18
- langfun/env/event_handlers/metric_writer.py +176 -140
- langfun/env/interface.py +493 -199
- langfun/env/interface_test.py +30 -1
- langfun/env/test_utils.py +110 -78
- {langfun-0.1.2.dev202511010804.dist-info → langfun-0.1.2.dev202511030805.dist-info}/METADATA +1 -1
- {langfun-0.1.2.dev202511010804.dist-info → langfun-0.1.2.dev202511030805.dist-info}/RECORD +21 -20
- {langfun-0.1.2.dev202511010804.dist-info → langfun-0.1.2.dev202511030805.dist-info}/WHEEL +0 -0
- {langfun-0.1.2.dev202511010804.dist-info → langfun-0.1.2.dev202511030805.dist-info}/licenses/LICENSE +0 -0
- {langfun-0.1.2.dev202511010804.dist-info → langfun-0.1.2.dev202511030805.dist-info}/top_level.txt +0 -0
|
@@ -84,43 +84,75 @@ class EventHandlerChain(interface.EventHandler):
|
|
|
84
84
|
|
|
85
85
|
def on_sandbox_start(
|
|
86
86
|
self,
|
|
87
|
-
environment: interface.Environment,
|
|
88
87
|
sandbox: interface.Sandbox,
|
|
89
88
|
duration: float,
|
|
90
89
|
error: BaseException | None
|
|
91
90
|
) -> None:
|
|
92
91
|
for handler in self._handlers:
|
|
93
|
-
handler.on_sandbox_start(
|
|
92
|
+
handler.on_sandbox_start(sandbox, duration, error)
|
|
94
93
|
|
|
95
94
|
def on_sandbox_status_change(
|
|
96
95
|
self,
|
|
97
|
-
environment: interface.Environment,
|
|
98
96
|
sandbox: interface.Sandbox,
|
|
99
97
|
old_status: interface.Sandbox.Status,
|
|
100
98
|
new_status: interface.Sandbox.Status,
|
|
101
99
|
span: float
|
|
102
100
|
) -> None:
|
|
103
101
|
for handler in self._handlers:
|
|
104
|
-
handler.on_sandbox_status_change(
|
|
105
|
-
environment, sandbox, old_status, new_status, span
|
|
106
|
-
)
|
|
102
|
+
handler.on_sandbox_status_change(sandbox, old_status, new_status, span)
|
|
107
103
|
|
|
108
104
|
def on_sandbox_shutdown(
|
|
109
105
|
self,
|
|
110
|
-
environment: interface.Environment,
|
|
111
106
|
sandbox: interface.Sandbox,
|
|
112
107
|
duration: float,
|
|
113
108
|
lifetime: float,
|
|
114
109
|
error: BaseException | None
|
|
115
110
|
) -> None:
|
|
116
111
|
for handler in self._handlers:
|
|
117
|
-
handler.on_sandbox_shutdown(
|
|
118
|
-
|
|
112
|
+
handler.on_sandbox_shutdown(sandbox, duration, lifetime, error)
|
|
113
|
+
|
|
114
|
+
def on_sandbox_session_start(
|
|
115
|
+
self,
|
|
116
|
+
sandbox: interface.Sandbox,
|
|
117
|
+
session_id: str,
|
|
118
|
+
duration: float,
|
|
119
|
+
error: BaseException | None
|
|
120
|
+
) -> None:
|
|
121
|
+
"""Called when a sandbox session starts."""
|
|
122
|
+
for handler in self._handlers:
|
|
123
|
+
handler.on_sandbox_session_start(sandbox, session_id, duration, error)
|
|
124
|
+
|
|
125
|
+
def on_sandbox_session_end(
|
|
126
|
+
self,
|
|
127
|
+
sandbox: interface.Sandbox,
|
|
128
|
+
session_id: str,
|
|
129
|
+
duration: float,
|
|
130
|
+
lifetime: float,
|
|
131
|
+
error: BaseException | None
|
|
132
|
+
) -> None:
|
|
133
|
+
"""Called when a sandbox session ends."""
|
|
134
|
+
for handler in self._handlers:
|
|
135
|
+
handler.on_sandbox_session_end(
|
|
136
|
+
sandbox, session_id, duration, lifetime, error
|
|
137
|
+
)
|
|
138
|
+
|
|
139
|
+
def on_sandbox_activity(
|
|
140
|
+
self,
|
|
141
|
+
name: str,
|
|
142
|
+
sandbox: interface.Sandbox,
|
|
143
|
+
session_id: str | None,
|
|
144
|
+
duration: float,
|
|
145
|
+
error: BaseException | None,
|
|
146
|
+
**kwargs
|
|
147
|
+
) -> None:
|
|
148
|
+
"""Called when a sandbox activity is performed."""
|
|
149
|
+
for handler in self._handlers:
|
|
150
|
+
handler.on_sandbox_activity(
|
|
151
|
+
name, sandbox, session_id, duration, error, **kwargs
|
|
119
152
|
)
|
|
120
153
|
|
|
121
154
|
def on_sandbox_housekeep(
|
|
122
155
|
self,
|
|
123
|
-
environment: interface.Environment,
|
|
124
156
|
sandbox: interface.Sandbox,
|
|
125
157
|
counter: int,
|
|
126
158
|
duration: float,
|
|
@@ -129,42 +161,30 @@ class EventHandlerChain(interface.EventHandler):
|
|
|
129
161
|
) -> None:
|
|
130
162
|
"""Called when a sandbox feature is housekeeping."""
|
|
131
163
|
for handler in self._handlers:
|
|
132
|
-
handler.on_sandbox_housekeep(
|
|
133
|
-
environment, sandbox, counter, duration, error, **kwargs
|
|
134
|
-
)
|
|
164
|
+
handler.on_sandbox_housekeep(sandbox, counter, duration, error, **kwargs)
|
|
135
165
|
|
|
136
166
|
def on_feature_setup(
|
|
137
167
|
self,
|
|
138
|
-
environment: interface.Environment,
|
|
139
|
-
sandbox: interface.Sandbox,
|
|
140
168
|
feature: interface.Feature,
|
|
141
169
|
duration: float,
|
|
142
170
|
error: BaseException | None
|
|
143
171
|
) -> None:
|
|
144
172
|
"""Called when a sandbox feature is setup."""
|
|
145
173
|
for handler in self._handlers:
|
|
146
|
-
handler.on_feature_setup(
|
|
147
|
-
environment, sandbox, feature, duration, error
|
|
148
|
-
)
|
|
174
|
+
handler.on_feature_setup(feature, duration, error)
|
|
149
175
|
|
|
150
176
|
def on_feature_teardown(
|
|
151
177
|
self,
|
|
152
|
-
environment: interface.Environment,
|
|
153
|
-
sandbox: interface.Sandbox,
|
|
154
178
|
feature: interface.Feature,
|
|
155
179
|
duration: float,
|
|
156
180
|
error: BaseException | None
|
|
157
181
|
) -> None:
|
|
158
182
|
"""Called when a sandbox feature is teardown."""
|
|
159
183
|
for handler in self._handlers:
|
|
160
|
-
handler.on_feature_teardown(
|
|
161
|
-
environment, sandbox, feature, duration, error
|
|
162
|
-
)
|
|
184
|
+
handler.on_feature_teardown(feature, duration, error)
|
|
163
185
|
|
|
164
186
|
def on_feature_setup_session(
|
|
165
187
|
self,
|
|
166
|
-
environment: interface.Environment,
|
|
167
|
-
sandbox: interface.Sandbox,
|
|
168
188
|
feature: interface.Feature,
|
|
169
189
|
session_id: str | None,
|
|
170
190
|
duration: float,
|
|
@@ -172,14 +192,10 @@ class EventHandlerChain(interface.EventHandler):
|
|
|
172
192
|
) -> None:
|
|
173
193
|
"""Called when a sandbox feature is setup."""
|
|
174
194
|
for handler in self._handlers:
|
|
175
|
-
handler.on_feature_setup_session(
|
|
176
|
-
environment, sandbox, feature, session_id, duration, error
|
|
177
|
-
)
|
|
195
|
+
handler.on_feature_setup_session(feature, session_id, duration, error)
|
|
178
196
|
|
|
179
197
|
def on_feature_teardown_session(
|
|
180
198
|
self,
|
|
181
|
-
environment: interface.Environment,
|
|
182
|
-
sandbox: interface.Sandbox,
|
|
183
199
|
feature: interface.Feature,
|
|
184
200
|
session_id: str,
|
|
185
201
|
duration: float,
|
|
@@ -187,69 +203,31 @@ class EventHandlerChain(interface.EventHandler):
|
|
|
187
203
|
) -> None:
|
|
188
204
|
"""Called when a sandbox feature is teardown."""
|
|
189
205
|
for handler in self._handlers:
|
|
190
|
-
handler.on_feature_teardown_session(
|
|
191
|
-
environment, sandbox, feature, session_id, duration, error
|
|
192
|
-
)
|
|
206
|
+
handler.on_feature_teardown_session(feature, session_id, duration, error)
|
|
193
207
|
|
|
194
|
-
def
|
|
208
|
+
def on_feature_activity(
|
|
195
209
|
self,
|
|
196
|
-
|
|
197
|
-
sandbox: interface.Sandbox,
|
|
210
|
+
name: str,
|
|
198
211
|
feature: interface.Feature,
|
|
199
|
-
|
|
212
|
+
session_id: str | None,
|
|
200
213
|
duration: float,
|
|
201
214
|
error: BaseException | None,
|
|
202
215
|
**kwargs
|
|
203
216
|
) -> None:
|
|
204
|
-
"""Called when a
|
|
205
|
-
for handler in self._handlers:
|
|
206
|
-
handler.on_feature_housekeep(
|
|
207
|
-
environment, sandbox, feature, counter, duration, error, **kwargs
|
|
208
|
-
)
|
|
209
|
-
|
|
210
|
-
def on_session_start(
|
|
211
|
-
self,
|
|
212
|
-
environment: interface.Environment,
|
|
213
|
-
sandbox: interface.Sandbox,
|
|
214
|
-
session_id: str,
|
|
215
|
-
duration: float,
|
|
216
|
-
error: BaseException | None
|
|
217
|
-
) -> None:
|
|
218
|
-
"""Called when a sandbox session starts."""
|
|
219
|
-
for handler in self._handlers:
|
|
220
|
-
handler.on_session_start(
|
|
221
|
-
environment, sandbox, session_id, duration, error
|
|
222
|
-
)
|
|
223
|
-
|
|
224
|
-
def on_session_end(
|
|
225
|
-
self,
|
|
226
|
-
environment: interface.Environment,
|
|
227
|
-
sandbox: interface.Sandbox,
|
|
228
|
-
session_id: str,
|
|
229
|
-
duration: float,
|
|
230
|
-
lifetime: float,
|
|
231
|
-
error: BaseException | None
|
|
232
|
-
) -> None:
|
|
233
|
-
"""Called when a sandbox session ends."""
|
|
217
|
+
"""Called when a feature activity is performed."""
|
|
234
218
|
for handler in self._handlers:
|
|
235
|
-
handler.
|
|
236
|
-
|
|
219
|
+
handler.on_feature_activity(
|
|
220
|
+
name, feature, session_id, duration, error, **kwargs
|
|
237
221
|
)
|
|
238
222
|
|
|
239
|
-
def
|
|
223
|
+
def on_feature_housekeep(
|
|
240
224
|
self,
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
sandbox: interface.Sandbox,
|
|
244
|
-
feature: interface.Feature | None,
|
|
245
|
-
session_id: str | None,
|
|
225
|
+
feature: interface.Feature,
|
|
226
|
+
counter: int,
|
|
246
227
|
duration: float,
|
|
247
228
|
error: BaseException | None,
|
|
248
229
|
**kwargs
|
|
249
230
|
) -> None:
|
|
250
|
-
"""Called when a sandbox
|
|
231
|
+
"""Called when a sandbox feature is housekeeping."""
|
|
251
232
|
for handler in self._handlers:
|
|
252
|
-
handler.
|
|
253
|
-
name, environment, sandbox, feature, session_id, duration, error,
|
|
254
|
-
**kwargs
|
|
255
|
-
)
|
|
233
|
+
handler.on_feature_housekeep(feature, counter, duration, error, **kwargs)
|
|
@@ -49,15 +49,14 @@ class MockEventHandler(interface.EventHandler):
|
|
|
49
49
|
'on_environment_shutdown', environment, duration, lifetime, error
|
|
50
50
|
)
|
|
51
51
|
|
|
52
|
-
def on_sandbox_start(self,
|
|
53
|
-
self._record_call('on_sandbox_start',
|
|
52
|
+
def on_sandbox_start(self, sandbox, duration, error):
|
|
53
|
+
self._record_call('on_sandbox_start', sandbox, duration, error)
|
|
54
54
|
|
|
55
55
|
def on_sandbox_status_change(
|
|
56
|
-
self,
|
|
56
|
+
self, sandbox, old_status, new_status, span
|
|
57
57
|
):
|
|
58
58
|
self._record_call(
|
|
59
59
|
'on_sandbox_status_change',
|
|
60
|
-
environment,
|
|
61
60
|
sandbox,
|
|
62
61
|
old_status,
|
|
63
62
|
new_status,
|
|
@@ -65,113 +64,100 @@ class MockEventHandler(interface.EventHandler):
|
|
|
65
64
|
)
|
|
66
65
|
|
|
67
66
|
def on_sandbox_shutdown(
|
|
68
|
-
self,
|
|
67
|
+
self, sandbox, duration, lifetime, error
|
|
69
68
|
):
|
|
69
|
+
self._record_call('on_sandbox_shutdown', sandbox, duration, lifetime, error)
|
|
70
|
+
|
|
71
|
+
def on_sandbox_session_start(self, sandbox, session_id, duration, error):
|
|
70
72
|
self._record_call(
|
|
71
|
-
'
|
|
73
|
+
'on_sandbox_session_start', sandbox, session_id, duration, error
|
|
72
74
|
)
|
|
73
75
|
|
|
74
|
-
def
|
|
75
|
-
self,
|
|
76
|
+
def on_sandbox_session_end(
|
|
77
|
+
self, sandbox, session_id, duration, lifetime, error
|
|
76
78
|
):
|
|
77
79
|
self._record_call(
|
|
78
|
-
'
|
|
79
|
-
environment,
|
|
80
|
+
'on_sandbox_session_end',
|
|
80
81
|
sandbox,
|
|
81
|
-
|
|
82
|
+
session_id,
|
|
82
83
|
duration,
|
|
84
|
+
lifetime,
|
|
83
85
|
error,
|
|
84
|
-
**kwargs,
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
def on_feature_setup(self, environment, sandbox, feature, duration, error):
|
|
88
|
-
self._record_call(
|
|
89
|
-
'on_feature_setup', environment, sandbox, feature, duration, error
|
|
90
|
-
)
|
|
91
|
-
|
|
92
|
-
def on_feature_teardown(self, environment, sandbox, feature, duration, error):
|
|
93
|
-
self._record_call(
|
|
94
|
-
'on_feature_teardown', environment, sandbox, feature, duration, error
|
|
95
86
|
)
|
|
96
87
|
|
|
97
|
-
def
|
|
98
|
-
self,
|
|
88
|
+
def on_sandbox_activity(
|
|
89
|
+
self,
|
|
90
|
+
name,
|
|
91
|
+
sandbox,
|
|
92
|
+
session_id,
|
|
93
|
+
duration,
|
|
94
|
+
error,
|
|
95
|
+
**kwargs,
|
|
99
96
|
):
|
|
100
97
|
self._record_call(
|
|
101
|
-
'
|
|
102
|
-
|
|
98
|
+
'on_sandbox_activity',
|
|
99
|
+
name,
|
|
103
100
|
sandbox,
|
|
104
|
-
feature,
|
|
105
101
|
session_id,
|
|
106
102
|
duration,
|
|
107
103
|
error,
|
|
104
|
+
**kwargs,
|
|
108
105
|
)
|
|
109
106
|
|
|
110
|
-
def
|
|
111
|
-
self, environment, sandbox, feature, session_id, duration, error
|
|
112
|
-
):
|
|
107
|
+
def on_sandbox_housekeep(self, sandbox, counter, duration, error, **kwargs):
|
|
113
108
|
self._record_call(
|
|
114
|
-
'
|
|
115
|
-
environment,
|
|
109
|
+
'on_sandbox_housekeep',
|
|
116
110
|
sandbox,
|
|
117
|
-
|
|
118
|
-
session_id,
|
|
111
|
+
counter,
|
|
119
112
|
duration,
|
|
120
113
|
error,
|
|
114
|
+
**kwargs,
|
|
121
115
|
)
|
|
122
116
|
|
|
123
|
-
def
|
|
124
|
-
|
|
125
|
-
|
|
117
|
+
def on_feature_setup(self, feature, duration, error):
|
|
118
|
+
self._record_call('on_feature_setup', feature, duration, error)
|
|
119
|
+
|
|
120
|
+
def on_feature_teardown(self, feature, duration, error):
|
|
121
|
+
self._record_call('on_feature_teardown', feature, duration, error)
|
|
122
|
+
|
|
123
|
+
def on_feature_setup_session(self, feature, session_id, duration, error):
|
|
126
124
|
self._record_call(
|
|
127
|
-
'
|
|
128
|
-
environment,
|
|
129
|
-
sandbox,
|
|
125
|
+
'on_feature_setup_session',
|
|
130
126
|
feature,
|
|
131
|
-
|
|
127
|
+
session_id,
|
|
132
128
|
duration,
|
|
133
129
|
error,
|
|
134
|
-
**kwargs,
|
|
135
130
|
)
|
|
136
131
|
|
|
137
|
-
def
|
|
138
|
-
self, environment, sandbox, session_id, duration, error
|
|
139
|
-
):
|
|
132
|
+
def on_feature_teardown_session(self, feature, session_id, duration, error):
|
|
140
133
|
self._record_call(
|
|
141
|
-
'
|
|
134
|
+
'on_feature_teardown_session',
|
|
135
|
+
feature,
|
|
136
|
+
session_id,
|
|
137
|
+
duration,
|
|
138
|
+
error,
|
|
142
139
|
)
|
|
143
140
|
|
|
144
|
-
def
|
|
145
|
-
self,
|
|
141
|
+
def on_feature_activity(
|
|
142
|
+
self, name, feature, session_id, duration, error, **kwargs,
|
|
146
143
|
):
|
|
147
144
|
self._record_call(
|
|
148
|
-
'
|
|
149
|
-
|
|
150
|
-
|
|
145
|
+
'on_feature_activity',
|
|
146
|
+
name,
|
|
147
|
+
feature,
|
|
151
148
|
session_id,
|
|
152
149
|
duration,
|
|
153
|
-
lifetime,
|
|
154
150
|
error,
|
|
151
|
+
**kwargs,
|
|
155
152
|
)
|
|
156
153
|
|
|
157
|
-
def
|
|
158
|
-
self,
|
|
159
|
-
name,
|
|
160
|
-
environment,
|
|
161
|
-
sandbox,
|
|
162
|
-
feature,
|
|
163
|
-
session_id,
|
|
164
|
-
duration,
|
|
165
|
-
error,
|
|
166
|
-
**kwargs,
|
|
154
|
+
def on_feature_housekeep(
|
|
155
|
+
self, feature, counter, duration, error, **kwargs
|
|
167
156
|
):
|
|
168
157
|
self._record_call(
|
|
169
|
-
'
|
|
170
|
-
name,
|
|
171
|
-
environment,
|
|
172
|
-
sandbox,
|
|
158
|
+
'on_feature_housekeep',
|
|
173
159
|
feature,
|
|
174
|
-
|
|
160
|
+
counter,
|
|
175
161
|
duration,
|
|
176
162
|
error,
|
|
177
163
|
**kwargs,
|
|
@@ -194,26 +180,19 @@ class EventHandlerChainTest(unittest.TestCase):
|
|
|
194
180
|
chain_handler.on_environment_start(env, 2.0, None)
|
|
195
181
|
chain_handler.on_environment_housekeep(env, 1, 3.0, None, a=1)
|
|
196
182
|
chain_handler.on_environment_shutdown(env, 4.0, 5.0, None)
|
|
197
|
-
chain_handler.on_sandbox_start(
|
|
198
|
-
chain_handler.on_sandbox_status_change(
|
|
199
|
-
chain_handler.on_sandbox_shutdown(
|
|
200
|
-
chain_handler.
|
|
201
|
-
chain_handler.
|
|
202
|
-
chain_handler.
|
|
203
|
-
chain_handler.
|
|
204
|
-
|
|
205
|
-
)
|
|
206
|
-
chain_handler.
|
|
207
|
-
|
|
208
|
-
)
|
|
209
|
-
chain_handler.on_feature_housekeep(
|
|
210
|
-
env, sandbox, feature, 3, 15.0, None, c=3
|
|
211
|
-
)
|
|
212
|
-
chain_handler.on_session_start(env, sandbox, 's2', 16.0, None)
|
|
213
|
-
chain_handler.on_session_end(env, sandbox, 's2', 17.0, 18.0, None)
|
|
214
|
-
chain_handler.on_sandbox_activity(
|
|
215
|
-
'act', env, sandbox, feature, 's2', 19.0, None, d=4
|
|
216
|
-
)
|
|
183
|
+
chain_handler.on_sandbox_start(sandbox, 6.0, None)
|
|
184
|
+
chain_handler.on_sandbox_status_change(sandbox, 'old', 'new', 7.0)
|
|
185
|
+
chain_handler.on_sandbox_shutdown(sandbox, 8.0, 9.0, None)
|
|
186
|
+
chain_handler.on_sandbox_session_start(sandbox, 's2', 16.0, None)
|
|
187
|
+
chain_handler.on_sandbox_session_end(sandbox, 's2', 17.0, 18.0, None)
|
|
188
|
+
chain_handler.on_sandbox_activity('act', sandbox, 's2', 19.0, None, d=4)
|
|
189
|
+
chain_handler.on_sandbox_housekeep(sandbox, 2, 10.0, None, b=2)
|
|
190
|
+
chain_handler.on_feature_setup(feature, 11.0, None)
|
|
191
|
+
chain_handler.on_feature_teardown(feature, 12.0, None)
|
|
192
|
+
chain_handler.on_feature_setup_session(feature, 's1', 13.0, None)
|
|
193
|
+
chain_handler.on_feature_teardown_session(feature, 's1', 14.0, None)
|
|
194
|
+
chain_handler.on_feature_activity('act', feature, 's1', 16.0, None, d=5)
|
|
195
|
+
chain_handler.on_feature_housekeep(feature, 3, 15.0, None, c=3)
|
|
217
196
|
|
|
218
197
|
self.assertEqual(handler1.calls, handler2.calls)
|
|
219
198
|
self.assertEqual(
|
|
@@ -224,34 +203,27 @@ class EventHandlerChainTest(unittest.TestCase):
|
|
|
224
203
|
('on_environment_start', (env, 2.0, None), {}),
|
|
225
204
|
('on_environment_housekeep', (env, 1, 3.0, None), {'a': 1}),
|
|
226
205
|
('on_environment_shutdown', (env, 4.0, 5.0, None), {}),
|
|
227
|
-
('on_sandbox_start', (
|
|
228
|
-
('on_sandbox_status_change', (
|
|
229
|
-
('on_sandbox_shutdown', (
|
|
230
|
-
('
|
|
231
|
-
('
|
|
232
|
-
('on_feature_teardown', (env, sandbox, feature, 12.0, None), {}),
|
|
233
|
-
(
|
|
234
|
-
'on_feature_setup_session',
|
|
235
|
-
(env, sandbox, feature, 's1', 13.0, None),
|
|
236
|
-
{},
|
|
237
|
-
),
|
|
238
|
-
(
|
|
239
|
-
'on_feature_teardown_session',
|
|
240
|
-
(env, sandbox, feature, 's1', 14.0, None),
|
|
241
|
-
{},
|
|
242
|
-
),
|
|
243
|
-
(
|
|
244
|
-
'on_feature_housekeep',
|
|
245
|
-
(env, sandbox, feature, 3, 15.0, None),
|
|
246
|
-
{'c': 3},
|
|
247
|
-
),
|
|
248
|
-
('on_session_start', (env, sandbox, 's2', 16.0, None), {}),
|
|
249
|
-
('on_session_end', (env, sandbox, 's2', 17.0, 18.0, None), {}),
|
|
206
|
+
('on_sandbox_start', (sandbox, 6.0, None), {}),
|
|
207
|
+
('on_sandbox_status_change', (sandbox, 'old', 'new', 7.0), {}),
|
|
208
|
+
('on_sandbox_shutdown', (sandbox, 8.0, 9.0, None), {}),
|
|
209
|
+
('on_sandbox_session_start', (sandbox, 's2', 16.0, None), {}),
|
|
210
|
+
('on_sandbox_session_end', (sandbox, 's2', 17.0, 18.0, None), {}),
|
|
250
211
|
(
|
|
251
212
|
'on_sandbox_activity',
|
|
252
|
-
('act',
|
|
213
|
+
('act', sandbox, 's2', 19.0, None),
|
|
253
214
|
{'d': 4},
|
|
254
215
|
),
|
|
216
|
+
('on_sandbox_housekeep', (sandbox, 2, 10.0, None), {'b': 2}),
|
|
217
|
+
('on_feature_setup', (feature, 11.0, None), {}),
|
|
218
|
+
('on_feature_teardown', (feature, 12.0, None), {}),
|
|
219
|
+
('on_feature_setup_session', (feature, 's1', 13.0, None), {}),
|
|
220
|
+
('on_feature_teardown_session', (feature, 's1', 14.0, None), {}),
|
|
221
|
+
(
|
|
222
|
+
'on_feature_activity',
|
|
223
|
+
('act', feature, 's1', 16.0, None),
|
|
224
|
+
{'d': 5}
|
|
225
|
+
),
|
|
226
|
+
('on_feature_housekeep', (feature, 3, 15.0, None), {'c': 3}),
|
|
255
227
|
],
|
|
256
228
|
)
|
|
257
229
|
|