JS Task API Reference

Class: StatsService

stats.StatsService

Table of contents

Constructors

Methods

Constructors

constructor

new StatsService(executorEvents, golemEvents, options?)

Parameters

NameType
executorEventsEventEmitter<ExecutorEvents, any>
golemEventsObject
golemEvents.marketEventEmitter<MarketEvents, any>
golemEvents.activityEventEmitter<ActivityEvents, any>
golemEvents.paymentEventEmitter<PaymentEvents, any>
options?StatsServiceOptions

Defined in

stats.ts:37

Methods

run

run(): Promise<void>

Returns

Promise<void>

Defined in

stats.ts:48


end

end(): Promise<void>

Returns

Promise<void>

Defined in

stats.ts:53


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

NameType
totalstring
paidstring

Defined in

stats.ts:60


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

stats.ts:77


getComputationTime

getComputationTime(): number

Returns the total computation time (in ms) of all tasks

Returns

number

Defined in

stats.ts:100


getAll

getAll(): Object

Returns

Object

NameType
providersnumber
agreementsnumber
invoicesReceivednumber
invoicesPaidnumber
invoicesUnpaidnumber
invoicesMissingnumber
invoicePaymentRatenumber

Defined in

stats.ts:165


getProposalsCount

getProposalsCount(): Object

Returns

Object

NameType
confirmednumber
initialnumber
rejectednumber

Defined in

stats.ts:177

Was this helpful?