class Beetle::JobExec
- Beetle::JobExec
- Reference
- Object
Overview
Defines a collection of statistics summarising a Job
execution.
You never directly instantiate this class. A JSON
representation of this class is returned in the response to an /exec
request.
If you define an Archiver
object for a Server
, an instance of this class
is also passed to the Archiver#archive
method.
It contains the following fields:
id
- A unique (UUID) identifier generated each time this job is executedname
- SeeJob
.name
host
- SeeJob
.host
run_for_sec
- SeeJob
.run_for_sec
run_n
- SeeJob
.run_n
n_swarm
- SeeJob
.n_swarm
t_start
- Time (UTC) the job execution was receivedelapsed_usec
- The total elapsed time (in microseconds) to execute the job. This will include server overhead to manage the job, wait for workers, etc.params
- SeeExec
.params
error_400_on_threshold_exceeded
- SeeExec
.error_400_on_threshold_exceeded
threshold_exceeded
- Boolean showing if one or more of the non-zero thresholds defined for this job were exceededtasks
- An array ofJobTaskExec
objects For example:
{
"id": "77f2d06c-be37-4bdc-98ad-02fed5acd892",
"name": "charges_local_2",
"host": "http://localhost:3001",
"t_start": "2019-02-19 21:36:47.430+00:00",
"elapsed_usec": 750782,
"params": {
"sc_mc": "mc"
},
"error_400_on_threshold_exceeded": false,
"tasks": {
"BCaaS::ChargeTask": {
"host": "http://localhost:3001",
"weight": 1,
"sleep_min_msec": 500,
"sleep_max_msec": 1000,
"threshold_avg_usec": 0,
"threshold_max_usec": 0,
"n_task": 2,
"n_success": 2,
"n_fail": 0,
"min_usec": 448,
"max_usec": 1980,
"avg_usec": 1214,
"tot_usec": 2428,
"executions": [
{
"id": "80b65420-2902-4e44-8676-6e2f620003af",
"swarm_id": 1,
"t_start": "2019-02-19 21:36:47.430+00:00",
"elapsed_usec": 1980,
"request_context": "buyer_id: 5066112c-b321-40a0-ac61-a7868b1921ee",
"is_success": true
},
{
"id": "5f173b79-9e11-423b-9fe9-e204c669af3a",
"swarm_id": 1,
"t_start": "2019-02-19 21:36:48.180+00:00",
"elapsed_usec": 448,
"request_context": "buyer_id: 45672a98-281a-4ee3-857a-89ea27fa2dcb",
"is_success": true
}
],
"threshold_avg_exceeded": false,
"threshold_max_exceeded": false
}
},
"run_for_sec": 0,
"run_n": 2,
"n_swarm": 1,
"threshold_exceeded": false
}
Included Modules
- JSON::Serializable
Defined in:
beetle/job-exec.crConstructors
Instance Method Summary
-
#clone
Returns a copy of
self
with all instance variables cloned.