Comparing version 1.0.0-alpha.1 to 1.0.0-alpha.2
@@ -48,5 +48,6 @@ /** | ||
/** | ||
* Perform the `fill` operation on the `Event` and emit. | ||
* Perform the rate operation on the `Event` and the the `_previous` | ||
* `Event` and emit the result. | ||
*/ | ||
addEvent(event: Event<T>): Immutable.List<Event<TimeRange>>; | ||
} |
@@ -83,3 +83,4 @@ "use strict"; | ||
/** | ||
* Perform the `fill` operation on the `Event` and emit. | ||
* Perform the rate operation on the `Event` and the the `_previous` | ||
* `Event` and emit the result. | ||
*/ | ||
@@ -101,2 +102,2 @@ addEvent(event) { | ||
exports.Rate = Rate; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmF0ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9yYXRlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7Ozs7R0FRRzs7QUFFSCx1Q0FBdUM7QUFDdkMsNEJBQTRCO0FBRTVCLG1DQUFnQztBQUloQywyQ0FBd0M7QUFFeEMsMkNBQW1EO0FBQ25ELGlDQUEwQjtBQUkxQjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0FvQkc7QUFDSCxVQUFpQyxTQUFRLHFCQUF1QjtJQU81RCxZQUFZLE9BQW9CO1FBQzVCLEtBQUssRUFBRSxDQUFDO1FBQ1IsTUFBTSxFQUFFLFNBQVMsRUFBRSxhQUFhLEdBQUcsS0FBSyxFQUFFLEdBQUcsT0FBTyxDQUFDO1FBRXJELFVBQVU7UUFDVixJQUFJLENBQUMsVUFBVSxHQUFHLENBQUMsQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxDQUFDLFNBQVMsQ0FBQztRQUNsRSxJQUFJLENBQUMsY0FBYyxHQUFHLGFBQWEsQ0FBQztRQUVwQyxpQkFB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CxNQUFNLElBQUksR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ2pDLEVBQUUsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7WUFDUCxTQUFTLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ3pCLENBQUM7UUFFRCxJQUFJLENBQUMsU0FBUyxHQUFHLEtBQUssQ0FBQztRQUV2QixNQUFNLENBQUMsU0FBUyxDQUFDLElBQUksQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUNyQyxDQUFDO0NBQ0o7QUE5RUQsb0JBOEVDIn0= |
@@ -9,3 +9,3 @@ import * as Immutable from "immutable"; | ||
import { TimeRange } from "./timerange"; | ||
import { AggregationSpec, AlignmentOptions, CollapseOptions, FillOptions, RateOptions, SelectOptions, WindowingOptions } from "./types"; | ||
import { AggregationSpec, AlignmentOptions, CoalesceOptions, CollapseOptions, FillOptions, RateOptions, ReduceOptions, SelectOptions, WindowingOptions } from "./types"; | ||
/** | ||
@@ -71,2 +71,7 @@ * A Node is a transformation between type S and type T. Both S | ||
/** | ||
* Reduces a sequence of past Event<T>s in the stream to a single output Event<M>. | ||
*/ | ||
reduce<M extends Key>(options: ReduceOptions<T>): EventStream<T, U>; | ||
coalesce(options: CoalesceOptions): EventStream<T, U>; | ||
/** | ||
* Fill missing values in stream events. | ||
@@ -234,3 +239,3 @@ * | ||
*/ | ||
addEvent(event: Event<U>): void; | ||
addEvent(e: Event<U>): void; | ||
/** | ||
@@ -292,12 +297,16 @@ * An output, specified as an `KeyedCollectionCallback`, essentially | ||
/** | ||
* Processing of incoming `Event` streams to for real time processing. | ||
* `Stream` and its associated objects are designed for processing of incoming | ||
* `Event` streams at real time. This is useful for live dashboard situations or | ||
* possibly real time monitoring and alerting from event streams. | ||
* | ||
* Supports remapping, filtering, windowing and aggregation. It is designed for | ||
* relatively light weight handling of incoming events. | ||
* relatively light weight handling of incoming events. Any distribution of | ||
* incoming events to different streams should be handled by the user. Typically | ||
* you would separate streams based on some incoming criteria. | ||
* | ||
* A `Stream` object manages a chain of processing nodes, each type of which | ||
* provides an appropiate interface. When a `Stream` is initially created with | ||
* the `stream()` factory function the interface you will be returned in an | ||
* `EventStream`. If you perform a windowing operation you will be exposed to | ||
* `KeyedCollectionStream`. While if you aggregate a `KeyedCollectionStream` you | ||
* the `stream()` factory function the interface exposed is an `EventStream`. | ||
* If you perform a windowing operation you will be exposed to a | ||
* `KeyedCollectionStream`. If you aggregate a `KeyedCollectionStream` you | ||
* will be back to an `EventStream` and so on. | ||
@@ -317,3 +326,3 @@ * | ||
* --- | ||
* Example: | ||
* Examples: | ||
* | ||
@@ -351,2 +360,62 @@ * ```typescript | ||
* ``` | ||
* | ||
* If you have multiple sources you can feed them into the same stream and combine them | ||
* with the `coalese()` processor. In this example two event sources are fed into the | ||
* `Stream`. One contains `Event`s with just a field "in", and the other just a field | ||
* "out". The resulting output is `Event`s with the latest (in arrival time) value for | ||
* "in" and "out" together: | ||
* | ||
* ```typescript | ||
* const source = stream() | ||
* .coalesce({ fields: ["in", "out"] }) | ||
* .output((e: Event) => results.push(e)); | ||
* | ||
* // Stream events | ||
* for (let i = 0; i < 5; i++) { | ||
* source.addEvent(streamIn[i]); // from stream 1 | ||
* source.addEvent(streamOut[i]); // from stream 2 | ||
* } | ||
* ``` | ||
* | ||
* You can do generalized reduce operations where you supply a function that | ||
* is provided with the last n points (defaults to 1) and the previous result | ||
* which is an `Event`. You will return the next result, and `Event`. | ||
* | ||
* You could use this to produce a running total: | ||
* | ||
* ``` | ||
* const source = stream() | ||
* .reduce({ | ||
* count: 1, | ||
* accumulator: event(time(), Immutable.Map({ total: 0 })), | ||
* iteratee(accum, eventList) { | ||
* const current = eventList.get(0); | ||
* const total = accum.get("total") + current.get("count"); | ||
* return event(time(current.timestamp()), Immutable.Map({ total })); | ||
* } | ||
* }) | ||
* .output((e: Event) => console.log("Running total:", e.toString()) ); | ||
* | ||
* // Add Events into the source... | ||
* events.forEach(e => source.addEvent(e)); | ||
* ``` | ||
* | ||
* Or produce a rolling average: | ||
* ``` | ||
* const source = stream() | ||
* .reduce({ | ||
* count: 5, | ||
* iteratee(accum, eventList) { | ||
* const values = eventList.map(e => e.get("value")).toJS(); | ||
* return event( | ||
* time(eventList.last().timestamp()), | ||
* Immutable.Map({ avg: avg()(values) }) | ||
* ); | ||
* } | ||
* }) | ||
* .output((e: Event) => console.log("Rolling average:", e.toString()) ); | ||
* | ||
* // Add Events into the source... | ||
* events.forEach(e => source.addEvent(e)); | ||
* ``` | ||
*/ | ||
@@ -353,0 +422,0 @@ export declare class Stream<U extends Key = Time> { |
@@ -20,2 +20,3 @@ "use strict"; | ||
const rate_1 = require("./rate"); | ||
const reduce_1 = require("./reduce"); | ||
const select_1 = require("./select"); | ||
@@ -199,17 +200,2 @@ const windowedcollection_1 = require("./windowedcollection"); | ||
} | ||
// /** | ||
// * @private | ||
// * | ||
// */ | ||
// // tslint:disable-next-line:max-classes-per-file | ||
// class ReduceNode<T extends Key> extends Node<Event<T>, Event<T>> { | ||
// private processor: Reduce<T>; | ||
// constructor(options: ReduceOptions) { | ||
// super(); | ||
// this.processor = new Reduce<T>(options); | ||
// } | ||
// process(e: Event<T>) { | ||
// return this.processor.addEvent(e); | ||
// } | ||
// } | ||
/** | ||
@@ -220,2 +206,16 @@ * @private | ||
// tslint:disable-next-line:max-classes-per-file | ||
class ReduceNode extends Node { | ||
constructor(options) { | ||
super(); | ||
this.processor = new reduce_1.Reducer(options); | ||
} | ||
process(e) { | ||
return this.processor.addEvent(e); | ||
} | ||
} | ||
/** | ||
* @private | ||
* | ||
*/ | ||
// tslint:disable-next-line:max-classes-per-file | ||
class WindowOutputNode extends Node { | ||
@@ -298,2 +298,29 @@ constructor(options) { | ||
/** | ||
* Reduces a sequence of past Event<T>s in the stream to a single output Event<M>. | ||
*/ | ||
reduce(options) { | ||
return this.stream.addEventMappingNode(new ReduceNode(options)); | ||
} | ||
coalesce(options) { | ||
const { fields } = options; | ||
function keyIn(...keys) { | ||
const keySet = Immutable.Set(...keys); | ||
return (v, k) => { | ||
return keySet.has(k); | ||
}; | ||
} | ||
return this.stream.addEventMappingNode(new ReduceNode({ | ||
count: 1, | ||
iteratee(accum, eventList) { | ||
const currentEvent = eventList.get(0); | ||
const currentKey = currentEvent.getKey(); | ||
const accumulatedEvent = !_.isNull(accum) | ||
? accum | ||
: event_1.event(currentKey, Immutable.Map({})); | ||
const filteredData = currentEvent.getData().filter(keyIn(fields)); | ||
return event_1.event(currentKey, accumulatedEvent.getData().merge(filteredData)); | ||
} | ||
})); | ||
} | ||
/** | ||
* Fill missing values in stream events. | ||
@@ -478,4 +505,4 @@ * | ||
*/ | ||
addEvent(event) { | ||
this.stream.addEvent(event); | ||
addEvent(e) { | ||
this.stream.addEvent(e); | ||
} | ||
@@ -542,12 +569,16 @@ /** | ||
/** | ||
* Processing of incoming `Event` streams to for real time processing. | ||
* `Stream` and its associated objects are designed for processing of incoming | ||
* `Event` streams at real time. This is useful for live dashboard situations or | ||
* possibly real time monitoring and alerting from event streams. | ||
* | ||
* Supports remapping, filtering, windowing and aggregation. It is designed for | ||
* relatively light weight handling of incoming events. | ||
* relatively light weight handling of incoming events. Any distribution of | ||
* incoming events to different streams should be handled by the user. Typically | ||
* you would separate streams based on some incoming criteria. | ||
* | ||
* A `Stream` object manages a chain of processing nodes, each type of which | ||
* provides an appropiate interface. When a `Stream` is initially created with | ||
* the `stream()` factory function the interface you will be returned in an | ||
* `EventStream`. If you perform a windowing operation you will be exposed to | ||
* `KeyedCollectionStream`. While if you aggregate a `KeyedCollectionStream` you | ||
* the `stream()` factory function the interface exposed is an `EventStream`. | ||
* If you perform a windowing operation you will be exposed to a | ||
* `KeyedCollectionStream`. If you aggregate a `KeyedCollectionStream` you | ||
* will be back to an `EventStream` and so on. | ||
@@ -567,3 +598,3 @@ * | ||
* --- | ||
* Example: | ||
* Examples: | ||
* | ||
@@ -601,2 +632,62 @@ * ```typescript | ||
* ``` | ||
* | ||
* If you have multiple sources you can feed them into the same stream and combine them | ||
* with the `coalese()` processor. In this example two event sources are fed into the | ||
* `Stream`. One contains `Event`s with just a field "in", and the other just a field | ||
* "out". The resulting output is `Event`s with the latest (in arrival time) value for | ||
* "in" and "out" together: | ||
* | ||
* ```typescript | ||
* const source = stream() | ||
* .coalesce({ fields: ["in", "out"] }) | ||
* .output((e: Event) => results.push(e)); | ||
* | ||
* // Stream events | ||
* for (let i = 0; i < 5; i++) { | ||
* source.addEvent(streamIn[i]); // from stream 1 | ||
* source.addEvent(streamOut[i]); // from stream 2 | ||
* } | ||
* ``` | ||
* | ||
* You can do generalized reduce operations where you supply a function that | ||
* is provided with the last n points (defaults to 1) and the previous result | ||
* which is an `Event`. You will return the next result, and `Event`. | ||
* | ||
* You could use this to produce a running total: | ||
* | ||
* ``` | ||
* const source = stream() | ||
* .reduce({ | ||
* count: 1, | ||
* accumulator: event(time(), Immutable.Map({ total: 0 })), | ||
* iteratee(accum, eventList) { | ||
* const current = eventList.get(0); | ||
* const total = accum.get("total") + current.get("count"); | ||
* return event(time(current.timestamp()), Immutable.Map({ total })); | ||
* } | ||
* }) | ||
* .output((e: Event) => console.log("Running total:", e.toString()) ); | ||
* | ||
* // Add Events into the source... | ||
* events.forEach(e => source.addEvent(e)); | ||
* ``` | ||
* | ||
* Or produce a rolling average: | ||
* ``` | ||
* const source = stream() | ||
* .reduce({ | ||
* count: 5, | ||
* iteratee(accum, eventList) { | ||
* const values = eventList.map(e => e.get("value")).toJS(); | ||
* return event( | ||
* time(eventList.last().timestamp()), | ||
* Immutable.Map({ avg: avg()(values) }) | ||
* ); | ||
* } | ||
* }) | ||
* .output((e: Event) => console.log("Rolling average:", e.toString()) ); | ||
* | ||
* // Add Events into the source... | ||
* events.forEach(e => source.addEvent(e)); | ||
* ``` | ||
*/ | ||
@@ -660,2 +751,2 @@ // tslint:disable-next-line:max-classes-per-file | ||
exports.stream = streamFactory; | ||
//# sourceMappingURL=data:application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immutable.List` containing two Dates. | ||
* - A Javascript array containing two `Date` or `ms` timestamps | ||
* - Two arguments, begin and end, each of which may be a `Date`, | ||
* a `Moment`, or a `ms` timestamp. | ||
* - A Javascript array containing two millisecond timestamps | ||
* - Two arguments, `begin` and `end`, each of which may be a `Date`, | ||
* a `Moment`, or a millisecond timestamp. | ||
*/ | ||
constructor(arg: TimeRange | Immutable.List<Date>); | ||
constructor(arg: TimeRange | Immutable.List<Date> | number[]); | ||
constructor(begin: Date, end: Date); | ||
@@ -156,3 +156,3 @@ constructor(begin: Time, end: Time); | ||
*/ | ||
declare function timerange(arg: TimeRange | Immutable.List<Date>): any; | ||
declare function timerange(arg: TimeRange | Immutable.List<Date> | number[]): any; | ||
declare function timerange(begin: Date, end: Date): any; | ||
@@ -159,0 +159,0 @@ declare function timerange(begin: Time, end: Time): any; |
@@ -48,2 +48,6 @@ "use strict"; | ||
} | ||
else if (arg1 instanceof Array) { | ||
const rangeArray = arg1; | ||
this._range = Immutable.List([new Date(rangeArray[0]), new Date(rangeArray[1])]); | ||
} | ||
else { | ||
@@ -249,2 +253,2 @@ const b = arg1; | ||
exports.timerange = timerange; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXJhbmdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3RpbWVyYW5nZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Ozs7Ozs7O0dBUUc7O0FBRUgsdUNBQXVDO0FBQ3ZDLDRCQUE0QjtBQUM1QixpQ0FBaUM7QUFHakMsK0JBQTRCO0FBRTVCLGlDQUE4QjtBQUU5Qjs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRztBQUNILGVBQXVCLFNBQVEsU0FBRztJQW1COUIsWUFBWSxJQUFTLEVBQUUsSUFBVTtRQUM3QixLQUFLLEVBQUUsQ0FBQztRQUNSLEVBQUUsQ0FBQyxDQUFDL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Q0FBQyxLQUFLLEVBQUUsQ0FBQztRQUN0RSxNQUFNLENBQUMsR0FBRyxJQUFJLENBQUMsR0FBRyxFQUFFLEdBQUcsS0FBSyxDQUFDLEdBQUcsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUUsQ0FBQztRQUM5RCxNQUFNLENBQUMsSUFBSSxTQUFTLENBQUMsSUFBSSxJQUFJLENBQUMsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDLEVBQUUsSUFBSSxJQUFJLENBQUMsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDLENBQUMsQ0FBQztJQUN2RSxDQUFDO0lBRUQ7O09BRUc7SUFDSCxRQUFRO1FBQ0osTUFBTSxDQUFDLElBQUksQ0FBQyxHQUFHLEVBQUUsQ0FBQyxPQUFPLEVBQUUsR0FBRyxJQUFJLENBQUMsS0FBSyxFQUFFLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDekQsQ0FBQztJQUVEOztPQUVHO0lBQ0gsZ0JBQWdCO1FBQ1osTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsSUFBSSxDQUFDLFFBQVEsRUFBRSxDQUFDLENBQUMsUUFBUSxFQUFFLENBQUM7SUFDdkQsQ0FBQztDQUNKO0FBdFBELDhCQXNQQztBQVdELG1CQUFtQixJQUFTLEVBQUUsSUFBVTtJQUNwQyxNQUFNLENBQUMsSUFBSSxTQUFTLENBQUMsSUFBSSxFQUFFLElBQUksQ0FBQyxDQUFDO0FBQ3JDLENBQUM7QUFFUSw4QkFBUyJ9 |
@@ -62,2 +62,35 @@ import * as Immutable from "immutable"; | ||
/** | ||
* Options object expected by the `reduce()` stream processor. The idea | ||
* of this processor is to take a list of Events, always of size `count` | ||
* (default is 1), | ||
* e.g. | ||
* ``` | ||
* { | ||
* count: 1, | ||
* accumulator: event(time(), Immutable.Map({ total: 0 })), | ||
* iteratee(accum, eventList) { | ||
* const current = eventList.get(0); | ||
* const total = accum.get("total") + current.get("count"); | ||
* return event(time(current.timestamp()), Immutable.Map({ total })); | ||
* } | ||
* } | ||
* ``` | ||
* * count - The number of `Event`s to include on each call | ||
* * reducer - a function mapping an `Immutable.List<Event>` to an `Event` | ||
* * accumulator - an optional `Event` initial value | ||
*/ | ||
export interface ReduceOptions<K extends Key> { | ||
count: number; | ||
accumulator?: Event<K>; | ||
iteratee: ListReducer<K>; | ||
} | ||
/** | ||
* Options object expected by the `coalesce()` stream processor. This | ||
* will take the latest of each field in `fields` and combine that into | ||
* a new `Event`. | ||
*/ | ||
export interface CoalesceOptions { | ||
fields: string[]; | ||
} | ||
/** | ||
* Options object expected by the `windowBy...()` functions. At this point, | ||
@@ -166,3 +199,3 @@ * this just defines the fixed window (e.g. window: period("1d")) and the | ||
seriesList: Array<TimeSeries<Key>>; | ||
reducer?: ReducerFunction | ArrayReducer | ListReducer; | ||
reducer?: ReducerFunction | ArrayMapper | ListMapper; | ||
fieldSpec?: string | string[]; | ||
@@ -185,10 +218,14 @@ [propName: string]: any; | ||
/** | ||
* A function which combines an array of events into a new array of events | ||
* A function which combines an Array<Event<Key>> into a new Array<Event<Key>> | ||
*/ | ||
export declare type ArrayReducer = (events: Array<Event<Key>>) => Array<Event<Key>>; | ||
export declare type ArrayMapper = (events: Array<Event<Key>>) => Array<Event<Key>>; | ||
/** | ||
* A function which combines a list of events into a new list of events | ||
* A function which combines a list of `Event`s into a new list of `Event`s | ||
*/ | ||
export declare type ListReducer = (events: Immutable.List<Event<Key>>) => Immutable.List<Event<Key>>; | ||
export declare type ListMapper = (events: Immutable.List<Event<Key>>) => Immutable.List<Event<Key>>; | ||
/** | ||
* A function which combines a `Immutable.List<Event<Key>>` into a single `Event` | ||
*/ | ||
export declare type ListReducer<T extends Key> = (accum: Event<T>, events: Immutable.List<Event<T>>) => Event<T>; | ||
/** | ||
* Tuple mapping a string -> `ReducerFunction` | ||
@@ -195,0 +232,0 @@ * e.g. `["value", avg()]` |
{ | ||
"name": "pondjs", | ||
"version": "1.0.0-alpha.1", | ||
"version": "1.0.0-alpha.2", | ||
"description": "A TimeSeries library built on Immutable.js with Typescript", | ||
@@ -5,0 +5,0 @@ "main": "lib/exports.js", |
@@ -26,2 +26,16 @@ declare const describe: any; | ||
const streamingEvents = [ | ||
event(time(0), Immutable.Map({ count: 5, value: 1 })), | ||
event(time(30000), Immutable.Map({ count: 3, value: 3 })), | ||
event(time(60000), Immutable.Map({ count: 4, value: 10 })), | ||
event(time(90000), Immutable.Map({ count: 1, value: 40 })), | ||
event(time(120000), Immutable.Map({ count: 5, value: 70 })), | ||
event(time(150000), Immutable.Map({ count: 3, value: 130 })), | ||
event(time(180000), Immutable.Map({ count: 2, value: 190 })), | ||
event(time(210000), Immutable.Map({ count: 6, value: 220 })), | ||
event(time(240000), Immutable.Map({ count: 1, value: 300 })), | ||
event(time(270000), Immutable.Map({ count: 0, value: 390 })), | ||
event(time(300000), Immutable.Map({ count: 2, value: 510 })) | ||
]; | ||
describe("Streaming", () => { | ||
@@ -345,71 +359,89 @@ it("can do streaming of just events", () => { | ||
}); | ||
}); | ||
/* | ||
// TODO: Streaming grouping | ||
it("can process a running total using the straeam reduce() function", () => { | ||
const results = []; | ||
it("can do streaming aggregation with grouping", () => { | ||
const eventsIn = [ | ||
// tslint:disable:max-line-length | ||
event( | ||
time(Date.UTC(2015, 2, 14, 7, 57, 0)), | ||
Immutable.Map({ type: "a", in: 3, out: 1 }) | ||
), | ||
event( | ||
time(Date.UTC(2015, 2, 14, 7, 58, 0)), | ||
Immutable.Map({ type: "a", in: 9, out: 2 }) | ||
), | ||
event( | ||
time(Date.UTC(2015, 2, 14, 7, 59, 0)), | ||
Immutable.Map({ type: "b", in: 6, out: 6 }) | ||
), | ||
event( | ||
time(Date.UTC(2015, 2, 14, 8, 0, 0)), | ||
Immutable.Map({ type: "a", in: 4, out: 7 }) | ||
), | ||
event( | ||
time(Date.UTC(2015, 2, 14, 8, 1, 0)), | ||
Immutable.Map({ type: "b", in: 5, out: 9 }) | ||
) | ||
]; | ||
const source = stream() | ||
.reduce({ | ||
count: 1, | ||
accumulator: event(time(), Immutable.Map({ total: 0 })), | ||
iteratee(accum, eventList) { | ||
const current = eventList.get(0); | ||
const total = accum.get("total") + current.get("count"); | ||
return event(time(current.timestamp()), Immutable.Map({ total })); | ||
} | ||
}) | ||
.output((e: Event) => results.push(e)); | ||
let result: Collection<Index>; | ||
// Stream events | ||
streamingEvents.forEach(e => source.addEvent(e)); | ||
const source = stream() | ||
.emitPerEvent() | ||
.groupBy("type") | ||
.fixedWindow(period("1h")) | ||
.aggregate({ | ||
type: ["type", keep()], | ||
in_avg: ["in", avg()], | ||
out_avg: ["out", avg()] | ||
}) | ||
.output(collection => { | ||
result = collection as Collection<Index>; | ||
}); | ||
expect(results[0].get("total")).toBe(5); | ||
expect(results[5].get("total")).toBe(21); | ||
expect(results[10].get("total")).toBe(32); | ||
}); | ||
eventsIn.forEach(event => source.addEvent(event)); | ||
it("can process a rolling average of the last 5 points", () => { | ||
const results = []; | ||
expect(result.at(0).get("type")).toBe("a"); | ||
expect(result.at(0).get("in_avg")).toBe(6); | ||
expect(result.at(0).get("out_avg")).toBe(1.5); | ||
expect(result.at(0).getKey().asString()).toBe("1h-396199"); | ||
const source = stream() | ||
.reduce({ | ||
count: 5, | ||
iteratee(accum, eventList) { | ||
const values = eventList.map(e => e.get("value")).toJS(); | ||
return event( | ||
time(eventList.last().timestamp()), | ||
Immutable.Map({ avg: avg()(values) }) | ||
); | ||
} | ||
}) | ||
.output((e: Event) => results.push(e)); | ||
expect(result.at(1).get("type")).toBe("a"); | ||
expect(result.at(1).get("in_avg")).toBe(4); | ||
expect(result.at(1).get("out_avg")).toBe(7); | ||
expect(result.at(1).getKey().asString()).toBe("1h-396200"); | ||
// Stream events | ||
streamingEvents.forEach(e => source.addEvent(e)); | ||
expect(result.at(3).get("type")).toBe("b"); | ||
expect(result.at(2).get("in_avg")).toBe(6); | ||
expect(result.at(2).get("out_avg")).toBe(6); | ||
expect(result.at(2).getKey().asString()).toBe("1h-396199"); | ||
expect(results[0].get("avg")).toBe(1); | ||
expect(results[5].get("avg")).toBe(50.6); | ||
expect(results[10].get("avg")).toBe(322); | ||
}); | ||
expect(result.at(3).get("type")).toBe("b"); | ||
expect(result.at(3).get("in_avg")).toBe(5); | ||
expect(result.at(3).get("out_avg")).toBe(9); | ||
expect(result.at(3).getKey().asString()).toBe("1h-396200"); | ||
}); | ||
it("can coalese two streams", () => { | ||
const results = []; | ||
const streamIn = [ | ||
event(time(Date.UTC(2015, 2, 14, 1, 15, 0)), Immutable.Map({ in: 1 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 16, 0)), Immutable.Map({ in: 2 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 17, 0)), Immutable.Map({ in: 3 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 18, 0)), Immutable.Map({ in: 4 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 19, 0)), Immutable.Map({ in: 5 })) | ||
]; | ||
const streamOut = [ | ||
event(time(Date.UTC(2015, 2, 14, 1, 15, 0)), Immutable.Map({ out: 9, count: 2 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 16, 0)), Immutable.Map({ out: 10, count: 3 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 17, 0)), Immutable.Map({ count: 4 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 18, 0)), Immutable.Map({ out: 12, count: 5 })), | ||
event(time(Date.UTC(2015, 2, 14, 1, 19, 0)), Immutable.Map({ out: 13, count: 6 })) | ||
]; | ||
const source = stream() | ||
.coalesce({ | ||
fields: ["in", "out"] | ||
}) | ||
.output((e: Event) => results.push(e)); | ||
// Stream events | ||
for (let i = 0; i < 5; i++) { | ||
source.addEvent(streamIn[i]); | ||
source.addEvent(streamOut[i]); | ||
} | ||
expect(results.length).toBe(10); | ||
expect(results[5].get("in")).toBe(3); | ||
expect(results[5].get("out")).toBe(10); | ||
expect(results[8].get("in")).toBe(5); | ||
expect(results[8].get("out")).toBe(12); | ||
expect(results[9].get("in")).toBe(5); | ||
expect(results[9].get("out")).toBe(13); | ||
}); | ||
}); | ||
*/ |
@@ -41,2 +41,7 @@ /** | ||
it("can create a new range with two millisecond tiemstamps as an array", () => { | ||
const range = timerange([1326309060000, 1329941520000]); | ||
expect(range.toJSON()).toEqual({ timerange: [1326309060000, 1329941520000] }); | ||
}) | ||
it("can be used to give a new range", () => { | ||
@@ -43,0 +48,0 @@ const beginTime = moment("2012-01-11 1:11", fmt).toDate(); |
@@ -55,2 +55,7 @@ declare const describe: any; | ||
it("can find the index string for a window given a time", () => { | ||
const t1 = time(new Date(2017, 11, 19, 12, 0, 0)); | ||
const hourly = window(duration("1h")); | ||
}); | ||
it("can use a day window", () => { | ||
@@ -57,0 +62,0 @@ const dayWindowNewYork = daily("America/New_York"); |
1272704
84
21023