Class: StatsService
stats.StatsService
Table of contents
Constructors
Methods
Constructors
constructor
• new StatsService(executorEvents
, golemEvents
, options?
)
Parameters
Name | Type |
---|---|
executorEvents | EventEmitter <ExecutorEvents , any > |
golemEvents | Object |
golemEvents.market | EventEmitter <MarketEvents , any > |
golemEvents.activity | EventEmitter <ActivityEvents , any > |
golemEvents.payment | EventEmitter <PaymentEvents , 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 | string |
paid | string |
Defined in
getAllCostsSummary
▸ getAllCostsSummary(): { Agreement
: string
; Provider Name
: string
; Task Computed
: number
; Cost
: undefined
| string
; 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
| string
; 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 |
Defined in
getProposalsCount
▸ getProposalsCount(): Object
Returns
Object
Name | Type |
---|---|
confirmed | number |
initial | number |
rejected | number |
Defined in
Was this helpful?