tolerance — sets the maximum gap between timestamps of any two points.


(tolerance seconds nanoseconds)



An integer number of seconds.


An integer number of nanoseconds.


On success, t. This command always succeeds.


The tolerance command sets timestamp tolerance. The tolerance is the maximum gap between the timestamps of any two points on a line. Whenever a point is to be logged, the Cascade TextLogger checks the current log line in the buffer. If the timestamp gap between this point and any other point in the buffer has exceeded the tolerance, the existing line in the buffer is written first, and then this point is logged on a new line in the buffer.

The tolerance is globally applied to all logs all the time. There is no way to prevent it from being applied, but you can effectively ignore it by setting it to a very high number. The default tolerance is one millisecond.

This command corresponds to the Cogent C API function LG_Tolerance.

See Also

collect, fall, timestamp


This example shows two files that were generated identically, except for using the two different tolerances shown here. To illustrate the point, the (collect any) command is applied to all logs.

(tolerance 0 30000)
(tolerance 2 0)
(collect any)

Here, with the tolerance at 30000 nanoseconds, each new data point occurs outside the tolerance, and thus forces a new line of data to be written.

Level readings for Oct 12, 2000:

                   L1  L2  L3
15:43:0195 Levels: 52  *   * 
15:43:0198 Levels: 45  *   * 
15:43:0200 Levels: 63  *   * 
15:43:0203 Levels: *   80  * 
15:43:0205 Levels: *   *   89
15:43:0208 Levels: 72  *   * 
15:43:0210 Levels: *   81  * 
15:43:0213 Levels: *   *   90

Here, on the other hand, with the tolerance set to 2 seconds, the points L1, L2, and L3 all happen to fall within the tolerance, and are thus recorded on the same line. Notice that the point L1 gets a new line each time its value changes, even though the changes occur within the tolerance time.

Level readings for Oct 12, 2000:

                   L1  L2  L3
15:41:5385 Levels: 52  *   * 
15:41:5388 Levels: 45  *   * 
15:41:5395 Levels: 63  80  89
15:41:5403 Levels: 72  81  90