Skip to main content

Class: TaskQueueStats

taskqueue.v1.TaskQueueStats

For workflow task queues, we only report the normal queue stats, not sticky queues. This means the stats reported here do not count all workflow tasks. However, because the tasks queued in sticky queues only remain valid for a few seconds, the inaccuracy becomes less significant as the backlog age grows.

Implements

Constructors

constructor

new TaskQueueStats(properties?): TaskQueueStats

Constructs a new TaskQueueStats.

Parameters

NameTypeDescription
properties?ITaskQueueStatsProperties to set

Returns

TaskQueueStats

Properties

approximateBacklogAge

Optional approximateBacklogAge: null | IDuration

Approximate age of the oldest task in the backlog based on the create timestamp of the task at the head of the queue.

Implementation of

ITaskQueueStats.approximateBacklogAge


approximateBacklogCount

approximateBacklogCount: Long

The approximate number of tasks backlogged in this task queue. May count expired tasks but eventually converges to the right value.

Implementation of

ITaskQueueStats.approximateBacklogCount


tasksAddRate

tasksAddRate: number

Approximate tasks per second added to the task queue based on activity within a fixed window. This includes both backlogged and sync-matched tasks.

Implementation of

ITaskQueueStats.tasksAddRate


tasksDispatchRate

tasksDispatchRate: number

Approximate tasks per second dispatched to workers based on activity within a fixed window. This includes both backlogged and sync-matched tasks.

Implementation of

ITaskQueueStats.tasksDispatchRate

Methods

toJSON

toJSON(): Object

Converts this TaskQueueStats to JSON.

Returns

Object

JSON object


create

create(properties?): TaskQueueStats

Creates a new TaskQueueStats instance using the specified properties.

Parameters

NameTypeDescription
properties?ITaskQueueStatsProperties to set

Returns

TaskQueueStats

TaskQueueStats instance


decode

decode(reader, length?): TaskQueueStats

Decodes a TaskQueueStats message from the specified reader or buffer.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from
length?numberMessage length if known beforehand

Returns

TaskQueueStats

TaskQueueStats

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


decodeDelimited

decodeDelimited(reader): TaskQueueStats

Decodes a TaskQueueStats message from the specified reader or buffer, length delimited.

Parameters

NameTypeDescription
readerUint8Array | ReaderReader or buffer to decode from

Returns

TaskQueueStats

TaskQueueStats

Throws

If the payload is not a reader or valid buffer

Throws

If required fields are missing


encode

encode(message, writer?): Writer

Encodes the specified TaskQueueStats message. Does not implicitly temporal.api.taskqueue.v1.TaskQueueStats.verify|verify messages.

Parameters

NameTypeDescription
messageITaskQueueStatsTaskQueueStats message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


encodeDelimited

encodeDelimited(message, writer?): Writer

Encodes the specified TaskQueueStats message, length delimited. Does not implicitly temporal.api.taskqueue.v1.TaskQueueStats.verify|verify messages.

Parameters

NameTypeDescription
messageITaskQueueStatsTaskQueueStats message or plain object to encode
writer?WriterWriter to encode to

Returns

Writer

Writer


fromObject

fromObject(object): TaskQueueStats

Creates a TaskQueueStats message from a plain object. Also converts values to their respective internal types.

Parameters

NameTypeDescription
objectObjectPlain object

Returns

TaskQueueStats

TaskQueueStats


getTypeUrl

getTypeUrl(typeUrlPrefix?): string

Gets the default type url for TaskQueueStats

Parameters

NameTypeDescription
typeUrlPrefix?stringyour custom typeUrlPrefix(default "type.googleapis.com")

Returns

string

The default type url


toObject

toObject(message, options?): Object

Creates a plain object from a TaskQueueStats message. Also converts values to other types if specified.

Parameters

NameTypeDescription
messageTaskQueueStatsTaskQueueStats
options?IConversionOptionsConversion options

Returns

Object

Plain object