Optimize code
This commit is contained in:
parent
614b836983
commit
7124a40f3d
|
@ -356,7 +356,7 @@ init([]) ->
|
|||
% Store reserved indices
|
||||
lists:foreach(fun({Type, Name}) ->
|
||||
Idx = reserved_idx(Name),
|
||||
Metric = #metric{name = Name, type = Type, idx = reserved_idx(Name)},
|
||||
Metric = #metric{name = Name, type = Type, idx = Idx},
|
||||
true = ets:insert(?TAB, Metric),
|
||||
ok = counters:put(CRef, Idx, 0)
|
||||
end,?BYTES_METRICS ++ ?PACKET_METRICS ++ ?MESSAGE_METRICS ++ ?MQTT_METRICS),
|
||||
|
|
Loading…
Reference in New Issue