### The system namespace contains functions that provide information about the ### tremor runtime system. ## Returns the name of the host where tremor is running. ## ## > ```tremor ## > use tremor::system; ## > let hostname = system::hostname(); ## > ``` ## ## Returns a `string` intrinsic fn hostname() as system::hostname; ## Returns the ingest time into tremor of the current event. ## ## > ```tremor ## > use tremor::system; ## > let ingest_ns = system::ingest_ns(); ## > ``` ## ## Returns an `int` intrinsic fn ingest_ns() as system::ingest_ns; ## Returns the instance name of this tremor process. ## ## > ```tremor ## > 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" ... ## > case _ => "changed by user" ## > end ## > ``` ## ## Returns a `string` intrinsic fn instance() as system::instance; ## Returns the current time in epoch nanoseconds ## ## WARNING: This function is expensive, please ## avoid using it. If you can use `ingest_ns` instead. ## `ingest_ns` is virtually free as it is genreated ## only once per event. ## ## > ```tremor ## > use tremor::system; ## > let now = system::nanotime(); ## > true == system::nanotime() >= now ## > ``` ## ## Returns an `int` intrinsic fn nanotime() as system::nanotime; ## Returns the tremor version as a string ## ## > ```tremor ## > use tremor::system; ## > let version = system::version(); ## > ``` ## ## Returns a `string` intrinsic fn version() as system::version;