Class: StatsService
stats.StatsService
Table of contents
Constructors
Methods
Constructors
constructor
• new StatsService(events
, options?
)
Parameters
Name | Type |
---|---|
events | EventEmitter <TaskExecutorEventsDict , any > |
options? | StatsServiceOptions |
Defined in
Methods
run
â–¸ run(): Promise
<void
>
Returns
Promise
<void
>
Defined in
end
â–¸ end(): Promise
<void
>
Returns
Promise
<void
>
Defined in
getAllCosts
â–¸ getAllCosts(): Object
Returns the sum of all costs generated by tasks in the total field, and the sum of all paid invoices in paid field
Returns
Object
Name | Type |
---|---|
total | number |
paid | number |
Defined in
getAllCostsSummary
â–¸ getAllCostsSummary(): { Agreement
: string
; Provider Name
: string
; Task Computed
: number
; Cost
: undefined
| number
; Payment Status
: string
}[]
Returns an array of agreements and the number of tasks performed on them, as well as total costs and payment status
Returns
{ Agreement
: string
; Provider Name
: string
; Task Computed
: number
; Cost
: undefined
| number
; Payment Status
: string
}[]
Defined in
getComputationTime
â–¸ getComputationTime(): number
Returns the total computation time (in ms) of all tasks
Returns
number
Defined in
getAll
â–¸ getAll(): Object
Returns
Object
Name | Type |
---|---|
providers | number |
agreements | number |
invoicesReceived | number |
invoicesPaid | number |
invoicesUnpaid | number |
invoicesMissing | number |
invoicePaymentRate | number |