Skip to main content
Version: edge

system

The system namespace contains functions that provide information about the tremor runtime system.

Functions

nanotime()

Returns the current time in epoch nanoseconds

use tremor::system;
let now = system::nanotime();
true == system::nanotime() >= now

Returns an int

hostname()

Returns the name of the host where tremor is running.

use tremor::system;
let hostname = system::hostname();

Returns a string

instance()

Returns the instance name of this tremor process.

use tremor::system;
match system::instance() of
case "tremor" => "default"
# Instance names can be customized by users
# TREMOR_PATH=/path/to/lib tremor -i "bob" ...
default => "changed by user"
end

Returns a string

ingest_ns()

Returns the ingest time into tremor of the current event.

use tremor::system;
let ingest_ns = system::ingest_ns();

Returns an int

version()

Returns the tremor version as a string

use tremor::system;
let version = system::version();

Returns a string