Ctop::Collectors::Base(T)
Base class for all collectors providing shared timing utilities.
Generic type T represents the Snapshot type returned by collect.
Each collector defines its own Snapshot record and inherits from Base(Snapshot).
class CPU < Base(CPU::Snapshot)
record Snapshot, usage : Float64
def collect : Snapshot
Snapshot.new(usage: 50.0)
end
end