周子博 7 лет назад
Родитель
Сommit
fde5fbe73a
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      src/emqx_metrics.erl

+ 5 - 5
src/emqx_metrics.erl

@@ -172,11 +172,11 @@ trans(dec, gauge, Metric, Val) ->
 
 hold(Type, Metric, Val) when Type =:= counter orelse Type =:= gauge ->
     put('$metrics', case get('$metrics') of
-                     undefined ->
-                         #{{Type, Metric} => Val};
-                     Metrics ->
-                         maps:update_with({Type, Metric}, fun(Cnt) -> Cnt + Val end, Val, Metrics)
-                 end).
+                        undefined ->
+                            #{{Type, Metric} => Val};
+                        Metrics ->
+                            maps:update_with({Type, Metric}, fun(Cnt) -> Cnt + Val end, Val, Metrics)
+                    end).
 
 commit() ->
     case get('$metrics') of