I made following projection in Event Store:
fromCategory('Ping')
.foreachStream()
.when({
$init: function() {
return {
min: 0,
max: 0,
sum: 0,
cnt: 0
};
},
$any: function(s, e) {
if (s.max < e.body.AcPower) {
s.max = e.body.AcPower;
}
if (s.min > e.body.AcPower) {
s.min = e.body.AcPower;
}
s.sum += e.body.AcPower;
s.cnt += 1;
s.avg = s.sum/s.cnt;
}
});
How can I get the result for a specific stream? The stream Ids are: "Ping-255.1", "Ping-255.2".... "Ping-255.1000"
Looking at: http://localhost:2113/projection/stats-cont i get:
{
"coreProcessingTime": 4072,
"version": 0,
"epoch": -1,
"effectiveName": "stats-cont",
"writesInProgress": 0,
"readsInProgress": 0,
"partitionsCached": 1000,
"status": "Running",
"stateReason": "",
"name": "stats-cont",
"mode": "Continuous",
"position": "$ce-Ping: 132233",
"progress": 100.0,
"lastCheckpoint": "$ce-Ping: 131999",
"eventsProcessedAfterRestart": 132234,
"statusUrl": "http://localhost:2113/projection/stats-cont",
"stateUrl": "http://localhost:2113/projection/stats-cont/state",
"resultUrl": "http://localhost:2113/projection/stats-cont/result",
"queryUrl": "http://localhost:2113/projection/stats-cont/query%3Fconfig=yes",
"enableCommandUrl": "http://localhost:2113/projection/stats-cont/command/enable",
"disableCommandUrl": "http://localhost:2113/projection/stats-cont/command/disable",
"checkpointStatus": "",
"bufferedEvents": 0,
"writePendingEventsBeforeCheckpoint": 0,
"writePendingEventsAfterCheckpoint": 0
}
The following is not working: http://localhost:2113/projection/stats-cont/state?partition=255.1
Thanks in advance.