HLDSRcon v1.0.1 HLDSRcon.Stats View Source
A struct representing the results of a stats call on a HLDS server.
%HLDSRcon.Stats{
cpu: 10.0,
in: 1.0,
out: 1.0,
uptime: 1,
users: 1,
fps: 1000.0,
players: 32
}
Link to this section Summary
Functions
Constructs a %HLDSRcon.Stats{} struct from a list of string values
Link to this section Functions
Constructs a %HLDSRcon.Stats{} struct from a list of string values
Expects a list matching;
[
value_cpu,
value_in,
value_out,
value_up,
value_users,
value_fps,
value_players
]
Example
iex> HLDSRcon.Stats.from([
...> "10.0",
...> "1.0",
...> "1.0",
...> "1",
...> "1",
...> "1000.0",
...> "32"
...> ])
%HLDSRcon.Stats{
cpu: 10.0,
in: 1.0,
out: 1.0,
uptime: 1,
users: 1,
fps: 1000.0,
players: 32
}