getStreamEngineStat

Syntax

getStreamEngineStat()

Alias: getAggregatorStat

Arguments

None

Details

Return a dictionary of tables with various metrics about all stream engines.

  • Table TimeSeriesEngine returns the following columns about time-series engines:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

windowTime

the length of the data window

step

the duration between 2 adjacent calculations

useSystemTime

whether the stream engine is triggered as soon as data are injected into the system

garbageSize

the threshold of the number of records in memory that triggers memory cleaning

numGroups

the number of groups that the stream engine has handled

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

memoryUsed

the amount of memory used

snapshotDir

the directory to save engine snapshot

snapshotInterval

the interval to save snapshot

snapshotMsgId

the msgId of engine snapshot

snapshotTimestamp

the timestamp of snapshot

  • Table CrossSectionalEngine returns the following columns about cross-sectional engines:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

triggeringPattern

how calculations are triggered

triggeringInterval

the duration in milliseconds between 2 adjacent calculations

memoryUsed

the amount of memory used

  • Table AnomalyDetectionEngine returns the following columns about the anomaly detection engines:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

numGroups

the number of groups that the stream engine has handled

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

snapshotDir

the directory to save engine snapshot

snapshotInterval

the interval to save snapshot

snapshotMsgId

the msgId of engine snapshot

snapshotTimestamp

the timestamp of snapshot

garbageSize

the threshold of the number of records in memory that triggers memory cleaning

memoryUsed

the amount of memory used

  • Table ReactiveStateEngine returns the following columns about the reactive state engines:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

numGroups

the number of groups that the stream engine has handled

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

memoryUsed

the amount of memory used

snapshotDir

the directory to save engine snapshot

snapshotInterval

the interval to save snapshot

snapshotMsgId

the msgId of engine snapshot

snapshotTimestamp

the timestamp of snapshot

  • Table SessionWindowEngine returns the following columns about the session window engine:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

sessionGap

gap between 2 session windows

useSystemTime

whether the stream engine is triggered as soon as data are ingested into the system

numGroups

the number of groups that the stream engine has handled

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

Metrics

the metacode of the metrics calculated by the stream engine

memoryUsed

the amount of memory used

snapshotDir

the directory to save snapshot

snapshotInterval

the interval to save snapshot

snapshotMsgId

the message ID (msgId) of engine snapshot

snapshotTimestamp

the timestamp of snapshot

  • Table DailyTimeSeriesEngine returns the following columns about the daily time series engine:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

windowTime

the length of the window

step

the duration between 2 adjacent calculations

useSystemTime

whether the stream engine is triggered as soon as data are injected into the system

garbageSize

the threshold of the number of records in memory that triggers memory cleaning

numGroups

the number of groups that the stream engine has handled

numRows

the number of records that has entered the stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

memoryUsed

the amount of memory used

snapshotDir

the directory to save snapshot

snapshotInterval

the interval to save snapshot

snapshotMsgId

the message ID (msgId) of engine snapshot

snapshotTimestamp

the timestamp of snapshot

  • Table AsofJoinEngine returns the following columns about the as of join engine:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

useSystemTime

the value of parameter useSystemTime in function createAsofJoinEngine

delayedTime

the value of parameter delayedTime in function createAsofJoinEngine

garbageSize

the threshold of the number of records in memory that triggers memory cleaning

leftTableNumRows

the number of records in the left table of stream engine

rightTableNumRows

the number of records in the right table of stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

memoryUsed

the amount of memory used

  • Table EqualJoinEngine returns the following columns about the equi join engine:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

garbageSize

whether the stream engine is triggered as soon as data are ingested into the system

leftTableNumRows

the number of records that has entered the left table of the stream engine

rightTableNumRows

the number of records that has entered the right table of the stream engine

numMetrics

the number of metrics calculated by the stream engine

metrics

the metacode of the metrics calculated by the stream engine

memoryUsed

the amount of memory used

  • Table StreamDispatchEngine returns the following columns about stream dispatch engines:

Column Name

Description

name

name of the stream engine

user

name of the user who created the stream engine

status

status of the stream engine. “OK” means available; “FATAL” means unavailable

lastErrMsg

the latest error message

numRows

the number of records that has entered the stream engine

garbageSize

the threshold of the number of records in memory that triggers memory cleaning

memoryUsed

the amount of memory used

Examples

$ share streamTable(10:0,`time`sym`price`qty,[TIMESTAMP,SYMBOL,DOUBLE,INT]) as trades
$ outputTable1 = table(10000:0, `time`sym`sumQty, [TIMESTAMP, SYMBOL, INT])
$ outputTable2 = table(1:0, `time`avgPrice`sumqty`Total, [TIMESTAMP,DOUBLE,INT,DOUBLE])
$ tradesTsAggregator = createTimeSeriesEngine(name="TimeSeriesDemo", windowSize=3, step=3, metrics=<[sum(qty)]>, dummyTable=trades, outputTable=outputTable1, timeColumn=`time, keyColumn=`sym, garbageSize=50)
$ tradesCsAggregator=createCrossSectionalEngine(name="CrossSectionalDemo", metrics=<[avg(price), sum(qty), sum(price*qty)]>, dummyTable=trades, outputTable=outputTable2, keyColumn=`sym, triggeringPattern=`perRow)
$ subscribeTable(tableName="trades", actionName="tradesTsAggregator", offset=0, handler=append!{tradesTsAggregator}, msgAsTable=true)
$ subscribeTable(tableName="trades", actionName="tradesCsAggregator", offset=0, handler=append!{tradesCsAggregator}, msgAsTable=true)

$ def writeData(n){
$    timev = 2000.10.08T01:01:01.001 + timestamp(1..n)
$    symv =take(`A`B, n)
$    pricev=take(102.1 33.4 73.6 223,n)
$    qtyv = take(60 74 82 59, n)
$    insert into trades values(timev, symv, pricev,qtyv)
$ }

$ writeData(4);

$ getStreamEngineStat().TimeSeriesEngine;
$ getStreamEngineStat().CrossSectionalEngine;