Represents resource usage statistics for a process or thread. All time values are in milliseconds.
- cpuUserTime : Time.Millisecond.Offset
CPU time spent in user mode (milliseconds)
- cpuSystemTime : Time.Millisecond.Offset
CPU time spent in kernel mode (milliseconds)
- peakResidentSetSizeKb : UInt64
Peak resident set size (max physical memory usage) in kilobytes
- minorPageFaults : UInt64
Number of minor (soft) page faults (no disk I/O)
- majorPageFaults : UInt64
Number of major (hard) page faults (disk I/O required)
- swapOperations : UInt64
Number of swap ins or swap outs
- blockInputOps : UInt64
Number of block input operations (disk reads)
- blockOutputOps : UInt64
Number of block output operations (disk writes)
- messagesSent : UInt64
Number of IPC messages sent
- messagesReceived : UInt64
Number of IPC messages received
- signalsReceived : UInt64
Number of signals received
- voluntaryContextSwitches : UInt64
Number of voluntary context switches (process yielded CPU)
- involuntaryContextSwitches : UInt64
Number of involuntary context switches (process preempted)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
A process identifier, represented by a numeric ID in UNIX systems (e.g. 1000).
- toUInt64 : UInt64
The numeric process ID.
Instances For
Equations
Equations
- Std.IO.Process.instOrdPId = { compare := Std.IO.Process.instOrdPId.ord }
Equations
- Std.IO.Process.instOrdPId.ord { toUInt64 := a } { toUInt64 := b } = (compare a b).then Ordering.eq
Instances For
Equations
- Std.IO.Process.instReprPId = { reprPrec := fun (u : Std.IO.Process.PId) => Repr.addAppParen (Std.Format.text "PId.mk " ++ repr u.toUInt64) }
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.
Instances For
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.
Equations
Instances For
Gets the current process id.
Instances For
Gets the current process parent id.
Instances For
Gets the current working directory.
Equations
- Std.IO.Process.getCwd = do let a ← Std.Internal.UV.System.cwd pure { toString := a }
Instances For
Changes the current working directory to a new one.
Equations
Instances For
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.
Equations
Instances For
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.
Equations
- Std.IO.Process.setPriority pid priority = Std.Internal.UV.System.osSetPriority pid.toUInt64 priority
Instances For
Retrieves resource usage statistics.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Returns the absolute path of the current executable.
Instances For
Returns the amount of free system memory in bytes.
Instances For
Returns the total system memory in bytes.
Instances For
Returns the constrained memory limit in bytes.
Instances For
Returns the available memory for allocation in bytes.