| OLD | NEW |
| 1 # Copyright 2015 The LUCI Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """This module defines ProtoRPC types for the Swarming Server handlers.""" | 5 """This module defines ProtoRPC types for the Swarming Server handlers.""" |
| 6 | 6 |
| 7 from protorpc import message_types | 7 from protorpc import message_types |
| 8 from protorpc import messages | 8 from protorpc import messages |
| 9 | 9 |
| 10 | 10 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 # this message in a GET request, this is due to DateTimeField's special | 164 # this message in a GET request, this is due to DateTimeField's special |
| 165 # encoding in protorpc-1.0/protorpc/message_types.py that is bypassed when | 165 # encoding in protorpc-1.0/protorpc/message_types.py that is bypassed when |
| 166 # using endpoints-1.0/endpoints/protojson.py to add GET query parameter | 166 # using endpoints-1.0/endpoints/protojson.py to add GET query parameter |
| 167 # support. | 167 # support. |
| 168 end = messages.FloatField(3) | 168 end = messages.FloatField(3) |
| 169 start = messages.FloatField(4) | 169 start = messages.FloatField(4) |
| 170 state = messages.EnumField(TaskState, 5, default='ALL') | 170 state = messages.EnumField(TaskState, 5, default='ALL') |
| 171 tags = messages.StringField(6, repeated=True) | 171 tags = messages.StringField(6, repeated=True) |
| 172 | 172 |
| 173 | 173 |
| 174 class PerformanceStatsRequest(messages.Message): | |
| 175 # Only applicable when fetching results. This incurs more DB operations and | |
| 176 # more data is returned so this is a bit slower. | |
| 177 include_performance_stats = messages.BooleanField(1, default=False) | |
| 178 | |
| 179 | |
| 180 ### Task-Related Responses | 174 ### Task-Related Responses |
| 181 | 175 |
| 182 | 176 |
| 183 class IsolatedOperation(messages.Message): | 177 class IsolatedOperation(messages.Message): |
| 184 duration = messages.FloatField(1) | 178 duration = messages.FloatField(1) |
| 185 initial_number_items = messages.IntegerField(2) | 179 initial_number_items = messages.IntegerField(2) |
| 186 initial_size = messages.IntegerField(3) | 180 initial_size = messages.IntegerField(3) |
| 187 # These buffers are compressed as deflate'd delta-encoded varints. They are | 181 # These buffers are compressed as deflate'd delta-encoded varints. They are |
| 188 # all the items for an isolated operation, which can scale in the 100k range. | 182 # all the items for an isolated operation, which can scale in the 100k range. |
| 189 # So can be large! See //client/utils/large.py for the code to handle these. | 183 # So can be large! See //client/utils/large.py for the code to handle these. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 | 379 |
| 386 | 380 |
| 387 class DeletedResponse(messages.Message): | 381 class DeletedResponse(messages.Message): |
| 388 """Indicates whether a bot was deleted.""" | 382 """Indicates whether a bot was deleted.""" |
| 389 deleted = messages.BooleanField(1) | 383 deleted = messages.BooleanField(1) |
| 390 | 384 |
| 391 | 385 |
| 392 class TerminateResponse(messages.Message): | 386 class TerminateResponse(messages.Message): |
| 393 """Returns the pseudo taskid to wait for the bot to shut down.""" | 387 """Returns the pseudo taskid to wait for the bot to shut down.""" |
| 394 task_id = messages.StringField(1) | 388 task_id = messages.StringField(1) |
| OLD | NEW |