ExFacts v0.1.9 ExFacts.System.CPU

Handles all logic with regards to collecting metrics on the CPUs of the host.

Direct calls can be made to every function in this module but that is strongly discouraged. As the surface area of the API grows it suggested that only the cpu_info/0 function is used as the entry point.

cpu_info/0 returns a ExFacts.System.CPU.InfoStat populated struct.

Summary

Functions

Returns the integer number of processors that on the host. Currently it relies on a call to the the system utility nproc, which means this function will only on Unix or Unix like systems

Returns a properly formed struct containing data on the host systems cpu(s)

Functions

counts()
counts() :: integer

Returns the integer number of processors that on the host. Currently it relies on a call to the the system utility nproc, which means this function will only on Unix or Unix like systems.

cpu_info()
cpu_info ::
  {atom, [%ExFacts.System.CPU.InfoStat{cache_size: term, core_id: term, cores: term, cpu: term, family: term, flags: term, mhz: term, microcode: term, model: term, model_name: term, physical_id: term, stepping: term, vendor_id: term}]} |
  binary

Returns a properly formed struct containing data on the host systems cpu(s).

finish_info(data)
finish_info(map) :: map
flatten_info(list, m \\ %{})
flatten_info(list, map) :: map
parse_info(in_data)
populate_info(data)
populate_info(map) :: %ExFacts.System.CPU.InfoStat{cache_size: term, core_id: term, cores: term, cpu: term, family: term, flags: term, mhz: term, microcode: term, model: term, model_name: term, physical_id: term, stepping: term, vendor_id: term}
split_data(data)
split_data(original :: [String.t]) :: []
split_data(data, i)
split_data(original :: list, interval :: integer) :: list