Documentation

Std.Internal.UV.System

Represents resource usage statistics for a process or thread. All time values are in milliseconds.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Represents the breakdown of CPU time usage in milliseconds.

      Instances For
        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          Information about a single CPU core.

          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For

              Information about the current user.

              Instances For
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  Information about the current group,

                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For

                      Information about the OS.

                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[extern lean_uv_get_process_title]

                          Gets the title of the current process.

                          On Linux and macOS, throws IO.Error.resourceExhausted in a process whose main is not a compiled Lean main, such as the lean executable, since only a compiled main sets up the title.

                          @[extern lean_uv_set_process_title]

                          Sets the title of the current process.

                          On Linux and macOS the title is stored in the memory of the process's original command line, so a longer title is cut to fit it, possibly in the middle of a UTF-8 character. There it throws IO.Error.resourceExhausted in a process whose main is not a compiled Lean main, as getProcessTitle does.

                          @[extern lean_uv_uptime]

                          Gets the system uptime in seconds.

                          @[extern lean_uv_os_getpid]

                          Gets the process ID of the current process.

                          @[extern lean_uv_os_getppid]

                          Gets the parent process ID of the current process.

                          @[extern lean_uv_cpu_info]

                          Gets information about the system's CPUs.

                          @[extern lean_uv_cwd]

                          Gets the current working directory.

                          @[extern lean_uv_chdir]

                          Changes the current working directory.

                          @[extern lean_uv_os_homedir]

                          Gets the path to the current user's home directory.

                          @[extern lean_uv_os_tmpdir]

                          Gets the path to the temporary directory.

                          @[extern lean_uv_os_get_passwd]

                          Gets a subset of the password file entry for the current user.

                          @[extern lean_uv_os_get_group]

                          Gets the group with the given ID, or none if there is no such group. Throws IO.Error.invalidArgument for an ID that does not fit the operating system's group ID type, and IO.Error.unsupportedOperation on Windows.

                          @[extern lean_uv_os_environ]

                          Gets all environment variables.

                          @[extern lean_uv_os_getenv]

                          Gets the value of an environment variable.

                          @[extern lean_uv_os_setenv]

                          Sets the value of an environment variable.

                          @[extern lean_uv_os_unsetenv]

                          Unsets an environment variable.

                          @[extern lean_uv_os_gethostname]

                          Gets the hostname of the machine.

                          @[extern lean_uv_os_getpriority]

                          Gets the scheduling priority of a process.

                          Throws IO.Error.invalidArgument for a process ID that does not fit the operating system's process ID type.

                          @[extern lean_uv_os_setpriority]

                          Sets the scheduling priority of a process.

                          Throws IO.Error.invalidArgument if the priority is outside the range from -20 (highest) to 19 (lowest), or for a process ID that does not fit the operating system's process ID type.

                          @[extern lean_uv_os_uname]

                          Gets information about the operating system.

                          @[extern lean_uv_hrtime]

                          Gets the current high-resolution time in nanoseconds.

                          @[extern lean_uv_random]

                          Generates cryptographically secure random bytes.

                          Throws IO.Error.resourceExhausted if more than 2^31 - 1 bytes are requested.

                          @[extern lean_uv_getrusage]

                          Retrieves resource usage statistics.

                          @[extern lean_uv_exepath]

                          Returns the absolute path of the current executable.

                          @[extern lean_uv_get_free_memory]

                          Returns the amount of free system memory in bytes.

                          @[extern lean_uv_get_total_memory]

                          Returns the total system memory in bytes.

                          @[extern lean_uv_get_constrained_memory]

                          Returns the constrained memory limit in bytes.

                          @[extern lean_uv_get_available_memory]

                          Returns the available memory for allocation in bytes.