brookengine.git
2 years agoTypo in my family name in README. spidle
Stanislaw Klekot [Thu, 9 Nov 2017 21:43:41 +0000 (22:43 +0100)]
Typo in my family name in README.

2 years agoAdded time step windows to `count' operation.
Stanislaw Klekot [Thu, 9 Nov 2017 21:40:27 +0000 (22:40 +0100)]
Added time step windows to `count' operation.

For both inc:* and set:* it takes O(n^2) time to update counters, so it could
be done more efficiently, though the code is quite simple and should be faster
with small `n' than fancier algorithms.

2 years agoAdded time tumble windows to `count' operation.
Stanislaw Klekot [Thu, 9 Nov 2017 21:18:41 +0000 (22:18 +0100)]
Added time tumble windows to `count' operation.

Added also a stub for time step windows.

2 years agoDeleted stale TODO comment.
Stanislaw Klekot [Thu, 9 Nov 2017 21:17:09 +0000 (22:17 +0100)]
Deleted stale TODO comment.

2 years agoMinor control flow simplification in `filter' operation.
Stanislaw Klekot [Thu, 9 Nov 2017 21:12:56 +0000 (22:12 +0100)]
Minor control flow simplification in `filter' operation.

2 years agoAdded time-based windows to `stats' operation.
Stanislaw Klekot [Thu, 27 Jul 2017 20:29:51 +0000 (22:29 +0200)]
Added time-based windows to `stats' operation.

2 years agoAdded time-based windows to `filter' operation.
Stanislaw Klekot [Tue, 25 Jul 2017 22:41:25 +0000 (00:41 +0200)]
Added time-based windows to `filter' operation.

2 years agoAdded time-based windows to `sample' operation.
Stanislaw Klekot [Tue, 25 Jul 2017 21:12:25 +0000 (23:12 +0200)]
Added time-based windows to `sample' operation.

2 years agoWrong window type returned from gen_spidle_op:window().
Stanislaw Klekot [Tue, 25 Jul 2017 21:10:38 +0000 (23:10 +0200)]
Wrong window type returned from gen_spidle_op:window().

2 years agoAdded parsing time window arguments.
Stanislaw Klekot [Mon, 26 Jun 2017 18:51:47 +0000 (20:51 +0200)]
Added parsing time window arguments.

2 years agoRewritten (again) windows calculation.
Stanislaw Klekot [Sun, 25 Jun 2017 13:02:58 +0000 (15:02 +0200)]
Rewritten (again) windows calculation.

This time I think I found the right abstraction level for managing windows.

2 years agoAdded step count window for `count inc:*' operation.
Stanislaw Klekot [Wed, 21 Jun 2017 22:29:29 +0000 (00:29 +0200)]
Added step count window for `count inc:*' operation.

2 years agoAdded step count window for `count set:*' operation.
Stanislaw Klekot [Wed, 21 Jun 2017 21:39:28 +0000 (23:39 +0200)]
Added step count window for `count set:*' operation.

The same is still needed for `count inc:*'.

2 years agoImplemented step count window for stats operation.
Stanislaw Klekot [Wed, 21 Jun 2017 20:39:54 +0000 (22:39 +0200)]
Implemented step count window for stats operation.

2 years agoOperations with windows migrated to new window types.
Stanislaw Klekot [Sun, 18 Jun 2017 16:24:37 +0000 (18:24 +0200)]
Operations with windows migrated to new window types.

2 years agoOperations with windows ported to the new window API.
Stanislaw Klekot [Sun, 18 Jun 2017 15:22:02 +0000 (17:22 +0200)]
Operations with windows ported to the new window API.

The new API is not fully utilized yet, though.

2 years agoImplemented slide and step windows in a generic way.
Stanislaw Klekot [Sun, 18 Jun 2017 13:49:51 +0000 (15:49 +0200)]
Implemented slide and step windows in a generic way.

This changes spidle_window module's API, and the modules that use windows are
not updated yet (the commit carries non-working code).

2 years agoImplemented step count window for `filter' operation.
Stanislaw Klekot [Fri, 16 Jun 2017 19:49:01 +0000 (21:49 +0200)]
Implemented step count window for `filter' operation.

2 years agoWrong state (accept list) used in `filter' operation.
Stanislaw Klekot [Fri, 16 Jun 2017 19:22:42 +0000 (21:22 +0200)]
Wrong state (accept list) used in `filter' operation.

2 years agoAdded vars container to `handle_timer()' callback function.
Stanislaw Klekot [Sun, 11 Jun 2017 19:54:49 +0000 (21:54 +0200)]
Added vars container to `handle_timer()' callback function.

It should make generating output messages easier.

2 years agoAdded filling vars store with nulls for timer events.
Stanislaw Klekot [Sun, 11 Jun 2017 19:48:45 +0000 (21:48 +0200)]
Added filling vars store with nulls for timer events.

2 years agoUnified spidle_query:run() functions into something similar to fire_timers().
Stanislaw Klekot [Sun, 11 Jun 2017 19:45:48 +0000 (21:45 +0200)]
Unified spidle_query:run() functions into something similar to fire_timers().

2 years agoImplemented firing timers set by operations.
Stanislaw Klekot [Sun, 11 Jun 2017 19:36:01 +0000 (21:36 +0200)]
Implemented firing timers set by operations.

This is a infrastructure necessary for time windows to work.

2 years agoSimplified a little data structures in spidle_query.
Stanislaw Klekot [Sun, 11 Jun 2017 18:08:56 +0000 (20:08 +0200)]
Simplified a little data structures in spidle_query.

Query now carries its state, and the state doesn't carry parts of the query.

2 years agoReading JSONs and processing them split into separate processes.
Stanislaw Klekot [Sun, 11 Jun 2017 16:31:03 +0000 (18:31 +0200)]
Reading JSONs and processing them split into separate processes.

This will allow me to support timers in command line.

2 years agoAdded empty and unused `handle_timer()' callbacks to op modules.
Stanislaw Klekot [Sun, 11 Jun 2017 16:13:57 +0000 (18:13 +0200)]
Added empty and unused `handle_timer()' callbacks to op modules.

2 years agoAdded a state container for operations' states and timers.
Stanislaw Klekot [Sun, 11 Jun 2017 15:19:19 +0000 (17:19 +0200)]
Added a state container for operations' states and timers.

Timers will be a necessary thing for time windows and count windows with
timeout.

2 years agoOperation's callback module moved from state to query form.
Stanislaw Klekot [Sun, 11 Jun 2017 14:57:46 +0000 (16:57 +0200)]
Operation's callback module moved from state to query form.

It makes more sense this way and is easier to work with.

2 years agoSimplified spidle_op_filter code a little.
Stanislaw Klekot [Thu, 8 Jun 2017 21:37:35 +0000 (23:37 +0200)]
Simplified spidle_op_filter code a little.

2 years agoAdded `filter step:slide'.
Stanislaw Klekot [Thu, 8 Jun 2017 21:24:58 +0000 (23:24 +0200)]
Added `filter step:slide'.

2 years agoAdded `filter' operation with tumble count window.
Stanislaw Klekot [Thu, 8 Jun 2017 20:39:08 +0000 (22:39 +0200)]
Added `filter' operation with tumble count window.

2 years agoAdded converting special window step values to "tumble" and "slide".
Stanislaw Klekot [Tue, 6 Jun 2017 22:14:26 +0000 (00:14 +0200)]
Added converting special window step values to "tumble" and "slide".

2 years agoIn all operations, s/advance/step/g.
Stanislaw Klekot [Tue, 6 Jun 2017 22:13:19 +0000 (00:13 +0200)]
In all operations, s/advance/step/g.

2 years agoUpdated spidle-ops(7) man page.
Stanislaw Klekot [Tue, 6 Jun 2017 21:53:19 +0000 (23:53 +0200)]
Updated spidle-ops(7) man page.

2 years ago`advance:*' window type allowed to be an expression.
Stanislaw Klekot [Tue, 6 Jun 2017 21:36:01 +0000 (23:36 +0200)]
`advance:*' window type allowed to be an expression.

2 years agoAdded slide count window for `stats'.
Stanislaw Klekot [Tue, 6 Jun 2017 21:07:43 +0000 (23:07 +0200)]
Added slide count window for `stats'.

2 years agoAdded `stats' operation with tumble count window.
Stanislaw Klekot [Tue, 6 Jun 2017 20:39:51 +0000 (22:39 +0200)]
Added `stats' operation with tumble count window.

2 years agoAdded variable name to a typedef.
Stanislaw Klekot [Tue, 6 Jun 2017 20:15:57 +0000 (22:15 +0200)]
Added variable name to a typedef.

2 years agoUnsupported windows rejected with more descriptive errors.
Stanislaw Klekot [Tue, 6 Jun 2017 20:14:40 +0000 (22:14 +0200)]
Unsupported windows rejected with more descriptive errors.

2 years agoRemoved planned `info:*' argument.
Stanislaw Klekot [Tue, 6 Jun 2017 20:02:41 +0000 (22:02 +0200)]
Removed planned `info:*' argument.

2 years agoRenamed planned `aggregate' operation to `stats'.
Stanislaw Klekot [Tue, 6 Jun 2017 19:58:06 +0000 (21:58 +0200)]
Renamed planned `aggregate' operation to `stats'.

2 years agoChanged the planned interface of `filter' operation.
Stanislaw Klekot [Tue, 6 Jun 2017 19:31:00 +0000 (21:31 +0200)]
Changed the planned interface of `filter' operation.

2 years agoAdded catching "unknown operation" semantic errors.
Stanislaw Klekot [Tue, 6 Jun 2017 19:16:58 +0000 (21:16 +0200)]
Added catching "unknown operation" semantic errors.

2 years agoMinor formatting change in docs.
Stanislaw Klekot [Tue, 6 Jun 2017 19:16:15 +0000 (21:16 +0200)]
Minor formatting change in docs.

2 years agoChanged the planned arguments for `aggregate' operation.
Stanislaw Klekot [Tue, 6 Jun 2017 19:15:47 +0000 (21:15 +0200)]
Changed the planned arguments for `aggregate' operation.

2 years ago`sample' now uses common window parsing functions.
Stanislaw Klekot [Tue, 6 Jun 2017 18:49:06 +0000 (20:49 +0200)]
`sample' now uses common window parsing functions.

2 years agoMoved window parsing functions from `count' operation to gen_spidle_op module.
Stanislaw Klekot [Tue, 6 Jun 2017 18:31:45 +0000 (20:31 +0200)]
Moved window parsing functions from `count' operation to gen_spidle_op module.

2 years agoAdded slide count window for `count set:*'
Stanislaw Klekot [Sat, 3 Jun 2017 15:13:40 +0000 (17:13 +0200)]
Added slide count window for `count set:*'

2 years agoAdded slide window count.
Stanislaw Klekot [Sat, 3 Jun 2017 14:09:06 +0000 (16:09 +0200)]
Added slide window count.

2 years agoReorganized parsing window arguments in `count' operation.
Stanislaw Klekot [Sat, 3 Jun 2017 13:13:43 +0000 (15:13 +0200)]
Reorganized parsing window arguments in `count' operation.

This way should accommodate different window types, like slide and advance.

2 years agoOperation state for window operations made a record.
Stanislaw Klekot [Sat, 3 Jun 2017 12:43:19 +0000 (14:43 +0200)]
Operation state for window operations made a record.

This way it will be easier to extend the operations with new window types.

2 years agoOperations from Spidle query moved to their separate modules.
Stanislaw Klekot [Sat, 3 Jun 2017 12:21:21 +0000 (14:21 +0200)]
Operations from Spidle query moved to their separate modules.

2 years agoSimplified streamline() code.
Stanislaw Klekot [Fri, 2 Jun 2017 19:38:08 +0000 (21:38 +0200)]
Simplified streamline() code.

Now it goes twice through the whole query, but it's way simpler to understand,
and query is usually quite short and parsing it shouldn't happen that often.

2 years agoAdded multivariable hash construction to Spidle grammar.
Stanislaw Klekot [Fri, 2 Jun 2017 18:31:52 +0000 (20:31 +0200)]
Added multivariable hash construction to Spidle grammar.

2 years agoPrepared AST for merging multiple hashes in cons templates.
Stanislaw Klekot [Fri, 2 Jun 2017 18:15:28 +0000 (20:15 +0200)]
Prepared AST for merging multiple hashes in cons templates.

2 years agoFixed wrong interpretation of `foo arg:{*Var}' as storing a value in Var.
Stanislaw Klekot [Fri, 2 Jun 2017 17:48:38 +0000 (19:48 +0200)]
Fixed wrong interpretation of `foo arg:{*Var}' as storing a value in Var.

2 years agoWindow functions moved to a separate module.
Stanislaw Klekot [Thu, 1 Jun 2017 21:09:35 +0000 (23:09 +0200)]
Window functions moved to a separate module.

This allowed me to simplify the implementation a little.

2 years agoExtracted carrying out operations to separate module.
Stanislaw Klekot [Thu, 1 Jun 2017 20:21:45 +0000 (22:21 +0200)]
Extracted carrying out operations to separate module.

2 years agoAdded deterministic grouping key calculation.
Stanislaw Klekot [Tue, 30 May 2017 20:51:21 +0000 (22:51 +0200)]
Added deterministic grouping key calculation.

Now hashes can be group-by keys, too.

2 years agoCommon code on count windows extracted from `count' and `sample' operations.
Stanislaw Klekot [Tue, 30 May 2017 20:28:40 +0000 (22:28 +0200)]
Common code on count windows extracted from `count' and `sample' operations.

2 years agoWritten support for `count reset:...' argument.
Stanislaw Klekot [Sun, 28 May 2017 14:00:43 +0000 (16:00 +0200)]
Written support for `count reset:...' argument.

2 years agoAdded two forgotten variable check clauses for streamlining pipelines.
Stanislaw Klekot [Sun, 28 May 2017 13:29:25 +0000 (15:29 +0200)]
Added two forgotten variable check clauses for streamlining pipelines.

2 years agoKeys specific to `count' and `sample' made similar to the promise in docs.
Stanislaw Klekot [Sun, 28 May 2017 13:22:35 +0000 (15:22 +0200)]
Keys specific to `count' and `sample' made similar to the promise in docs.

2 years ago`count' operation made to work on windows and group-by.
Stanislaw Klekot [Sun, 28 May 2017 13:13:08 +0000 (15:13 +0200)]
`count' operation made to work on windows and group-by.

2 years agoAdded group-by to `count' operation.
Stanislaw Klekot [Sun, 28 May 2017 12:37:17 +0000 (14:37 +0200)]
Added group-by to `count' operation.

2 years agoAdded group-by support to `sample' operation.
Stanislaw Klekot [Sun, 28 May 2017 12:23:16 +0000 (14:23 +0200)]
Added group-by support to `sample' operation.

2 years agoAdded simplified way to set multiple variables.
Stanislaw Klekot [Sun, 28 May 2017 12:13:49 +0000 (14:13 +0200)]
Added simplified way to set multiple variables.

2 years agoImplemented `sample' operation with tumble/count window.
Stanislaw Klekot [Sun, 28 May 2017 11:23:34 +0000 (13:23 +0200)]
Implemented `sample' operation with tumble/count window.

2 years agoArguments to `log' operation made really optional.
Stanislaw Klekot [Sun, 28 May 2017 10:47:30 +0000 (12:47 +0200)]
Arguments to `log' operation made really optional.

It was a bug that `log' failed when no arguments were specified.

2 years agoReorganized Spidle operations code.
Stanislaw Klekot [Sun, 28 May 2017 10:18:37 +0000 (12:18 +0200)]
Reorganized Spidle operations code.

2 years agoImplemented `trim' operation.
Stanislaw Klekot [Sun, 28 May 2017 09:56:03 +0000 (11:56 +0200)]
Implemented `trim' operation.

2 years agoAllowed $time in more places (mainly in numeric expressions).
Stanislaw Klekot [Fri, 26 May 2017 20:53:58 +0000 (22:53 +0200)]
Allowed $time in more places (mainly in numeric expressions).

Not everywhere I expect it to be useful, but I'm ready for such sacrifices for
the sake of consistency.

2 years agoDisallowed non-number timestamps.
Stanislaw Klekot [Fri, 26 May 2017 20:47:56 +0000 (22:47 +0200)]
Disallowed non-number timestamps.

2 years agoExtended spidle_query public API with external timestamps.
Stanislaw Klekot [Fri, 26 May 2017 20:43:52 +0000 (22:43 +0200)]
Extended spidle_query public API with external timestamps.

2 years agoRenamed internal function spidle_query:run() to run_query().
Stanislaw Klekot [Fri, 26 May 2017 20:34:28 +0000 (22:34 +0200)]
Renamed internal function spidle_query:run() to run_query().

It will allow me to add timestamp-aware spidle_query:run() function to the
public interface.

2 years agoAdded $time special variable for message's timestamp.
Stanislaw Klekot [Fri, 26 May 2017 20:28:44 +0000 (22:28 +0200)]
Added $time special variable for message's timestamp.

No way to set it from spidle_query:run()'s caller, though.

2 years agoDesigned and described how windows should work.
Stanislaw Klekot [Fri, 26 May 2017 19:53:00 +0000 (21:53 +0200)]
Designed and described how windows should work.

2 years agoAdded descriptions of operations.
Stanislaw Klekot [Fri, 26 May 2017 19:26:01 +0000 (21:26 +0200)]
Added descriptions of operations.

This gives me a roadmap for making Spidle useful.

2 years agoAdded docs skeleton.
Stanislaw Klekot [Fri, 26 May 2017 18:21:35 +0000 (20:21 +0200)]
Added docs skeleton.

2 years agoFixed default numeric values (`Var || 1' expression).
Stanislaw Klekot [Thu, 25 May 2017 21:38:24 +0000 (23:38 +0200)]
Fixed default numeric values (`Var || 1' expression).

2 years agoAdded support for multiple msg:* args to `count' operation.
Stanislaw Klekot [Thu, 25 May 2017 21:32:26 +0000 (23:32 +0200)]
Added support for multiple msg:* args to `count' operation.

2 years agoAdded support for multiple msg:* args to `emit' operation.
Stanislaw Klekot [Thu, 25 May 2017 21:23:26 +0000 (23:23 +0200)]
Added support for multiple msg:* args to `emit' operation.

2 years agoCleaned up `dup' operation code and added support for multiple msg:* args.
Stanislaw Klekot [Thu, 25 May 2017 21:19:56 +0000 (23:19 +0200)]
Cleaned up `dup' operation code and added support for multiple msg:* args.

2 years agoCleaned up log operation code a little.
Stanislaw Klekot [Thu, 25 May 2017 20:53:10 +0000 (22:53 +0200)]
Cleaned up log operation code a little.

2 years agoLogging op now can print variables, too.
Stanislaw Klekot [Thu, 25 May 2017 20:28:40 +0000 (22:28 +0200)]
Logging op now can print variables, too.

2 years agoAdded syntax for removing a key in hash construction.
Stanislaw Klekot [Thu, 25 May 2017 20:14:03 +0000 (22:14 +0200)]
Added syntax for removing a key in hash construction.

2 years agoAllowed using variables defined earlier in the same pattern.
Stanislaw Klekot [Thu, 25 May 2017 20:02:18 +0000 (22:02 +0200)]
Allowed using variables defined earlier in the same pattern.

At the same time, merged checking and collecting variables.

2 years agoNumber negation got wrong AST node.
Stanislaw Klekot [Thu, 25 May 2017 19:31:49 +0000 (21:31 +0200)]
Number negation got wrong AST node.

2 years agoFixed grammar for (1 -2) type expressions.
Stanislaw Klekot [Thu, 25 May 2017 19:30:24 +0000 (21:30 +0200)]
Fixed grammar for (1 -2) type expressions.

2 years agoI messed up the order of operands on the stack for numeric expressions.
Stanislaw Klekot [Thu, 25 May 2017 19:22:35 +0000 (21:22 +0200)]
I messed up the order of operands on the stack for numeric expressions.

2 years agoUnified variable recall AST nodes.
Stanislaw Klekot [Thu, 25 May 2017 19:12:20 +0000 (21:12 +0200)]
Unified variable recall AST nodes.

2 years agoUpdated edoc comments and typespecs in spidle_query module.
Stanislaw Klekot [Wed, 24 May 2017 20:55:57 +0000 (22:55 +0200)]
Updated edoc comments and typespecs in spidle_query module.

2 years agoSimplified op_run() operations by moving argument processing to op_init().
Stanislaw Klekot [Wed, 24 May 2017 20:47:57 +0000 (22:47 +0200)]
Simplified op_run() operations by moving argument processing to op_init().

2 years agoDialyzer made happy about operations producing invalid (non-hash) messages.
Stanislaw Klekot [Wed, 24 May 2017 20:28:14 +0000 (22:28 +0200)]
Dialyzer made happy about operations producing invalid (non-hash) messages.

2 years agoAdded `count' operation as a proof of concept for query state.
Stanislaw Klekot [Wed, 24 May 2017 20:27:47 +0000 (22:27 +0200)]
Added `count' operation as a proof of concept for query state.

2 years agoAdded state to operations.
Stanislaw Klekot [Wed, 24 May 2017 20:04:54 +0000 (22:04 +0200)]
Added state to operations.

2 years agoMoved iteration over messages to a separate function.
Stanislaw Klekot [Wed, 24 May 2017 19:17:42 +0000 (21:17 +0200)]
Moved iteration over messages to a separate function.

lists:foldl() with a closure was fine when it was called in just one clause,
but it soon will be in several.

2 years agoRenamed operation functions.
Stanislaw Klekot [Wed, 24 May 2017 19:08:05 +0000 (21:08 +0200)]
Renamed operation functions.

2 years agoImproved Spidle error reporting a little.
Stanislaw Klekot [Wed, 24 May 2017 19:00:03 +0000 (21:00 +0200)]
Improved Spidle error reporting a little.

2 years agoMoved spidle_query functions around.
Stanislaw Klekot [Wed, 24 May 2017 18:56:16 +0000 (20:56 +0200)]
Moved spidle_query functions around.