Skip to content

Instantly share code, notes, and snippets.

@nickwallen
Created August 24, 2016 21:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickwallen/ceaaf824f8d753a9e48a8a8740a9a121 to your computer and use it in GitHub Desktop.
Save nickwallen/ceaaf824f8d753a9e48a8a8740a9a121 to your computer and use it in GitHub Desktop.
| Name | | Description |
|--- |--- |--- |
| profile | Required | A unique name identifying the profile. The field is treated as a string. |
| foreach | Required | A separate profile is maintained *for each* of these. This is effectively the entity that the profile is describing. The field is expected to contain a Stellar expression whose result is the entity name. For example, if `ip_src_addr` then a separate profile would be maintained for each unique IP source address in the data; 10.0.0.1, 10.0.0.2, etc. |
| onlyif | Optional | An expression that determines if a message should be applied to the profile. A Stellar expression is expected that when executed returns a boolean. A message is only applied to a profile if this condition is true. This allows a profile to filter the messages that it receives. |
| groupBy | Optional | A list of Stellar expressions used to group the profile measurements when persisted. This is intended to sort the Profile data to allow for a contiguous scan when training on subsets of the data. The expressions can refer to any field within a ProfileMeasurement. For example, `start` would refer to the start time of the window in epoch millisconds.
| init | Optional | A set of expressions that is executed at the start of a window period. A map is expected where the key is the variable name and the value is a Stellar expression. The map can contain 0 or more variables/expressions. At the start of each window period the expression is executed once and stored in a variable with the given name. |
| update | Required | A set of expressions that is executed when a message is applied to the profile. A map is expected where the key is the variable name and the value is a Stellar expression. The map can include 0 or more variables/expressions. |
| result | Required | A Stellar expression that is executed when the window period expires. The expression is expected to in some way summarize the messages that were applied to the profile over the window period. The expression must result in a numeric value such as a Double, Long, Float, Short, or Integer. |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment