Skip to content

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Oct 15, 2018
1 parent 65d28eb commit 39e72ba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/Language.md
Expand Up @@ -549,3 +549,16 @@ grow unbounded as the number of sessions increases. If the programmer knows that
the `/end/` pattern is the last time a session will be observed, then the datum
at `$session` will be freed, which keeps `mtail` memory usage under control and
will improve search time for finding dimensioned metrics.

`del` can be modified with the `after` keyword, signalling that the metric
should be deleted after some period of no activity. For example, the
expression

```
del session_start[$session] after 24h
```

would mean that the datum indexed by `$session` will be removed 24 hours after the last update is recorded.

The del-after form takes any time period supported by the go
[`time.ParseDuration`](https://golang.org/pkg/time/#ParseDuration) function.
5 changes: 5 additions & 0 deletions docs/Programming-Guide.md
Expand Up @@ -201,6 +201,11 @@ the datum referenced by that label from this metric, keeping `mtail`'s memory
usage under control and speeding up labelset search time (by reducing the
search space!)

Alternatively, the statement `del connection_time[$pid] after 72h` would do the
same, but only if `connection_time$pid]` is not changed for 72 hours. This
form is more convenient when the connection close event is lossy or difficult
to determine.

## Computing moving averages

`mtail` deliberately does not implement complex mathematical functions. It
Expand Down

0 comments on commit 39e72ba

Please sign in to comment.