Skip to content

Commit 2519bcd

Browse files
committed
make elvis happy again
1 parent 634ccc6 commit 2519bcd

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

elvis.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
filter => "prometheus_model_helpers.erl",
3535
rules => [
3636
{elvis_style, line_length,
37-
#{limit => 80}},
37+
#{limit => 120}},
3838
{elvis_style, invalid_dynamic_call,
3939
#{ignore => [
4040
%% FIXME: why create_mf calls collect_metrics??

src/metrics/prometheus_quantile_summary.erl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ deregister(Registry, Name) ->
146146
set_default(Registry, Name) ->
147147
Configuration = get_configuration(Registry, Name),
148148
#{compress_limit := CompressLimit} = Configuration,
149-
ets:insert_new(?TABLE,{
149+
ets:insert_new(?TABLE, {
150150
key(Registry, Name, []),
151151
0,
152152
0,
@@ -340,7 +340,7 @@ collect_mf(Registry, Callback) ->
340340

341341
%% @private
342342
collect_metrics(Name, {CLabels, Labels, Registry, DU, Configuration}) ->
343-
#{quantiles := QNs} = Configuration,
343+
#{quantiles := QNs} = Configuration,
344344
MFValues = load_all_values(Registry, Name),
345345
ReducedMap = lists:foldl(
346346
fun([L, C, S, QE], ResAcc) ->
@@ -373,7 +373,7 @@ validate_summary_spec(Spec) ->
373373
{Invariant, QNs} = invariant_and_quantiles_from_spec(Spec),
374374
CompressLimit = compress_limit_from_spec(Spec),
375375
[
376-
{data,
376+
{data,
377377
#{quantiles => QNs,
378378
invariant => Invariant,
379379
compress_limit => CompressLimit}}
@@ -444,7 +444,7 @@ validate_targets(Targets) when is_list(Targets) ->
444444
erlang:error({invalid_targets, "target quantile value should be float"});
445445
({_Q, E}) when not is_float(E) ->
446446
erlang:error({invalid_targets, "target error value should be float"});
447-
({_, _}) ->
447+
({_, _}) ->
448448
ok;
449449
(_) ->
450450
erlang:error({invalid_targets, "targets should be tuples of quantile and error"})

test/eunit/format/prometheus_protobuf_format_tests.erl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ test_quantile_summary(_) ->
8383
prometheus_quantile_summary:observe(orders_quantile_summary, 10),
8484
prometheus_quantile_summary:observe(orders_quantile_summary, 15),
8585

86-
Expected = <<132,1,10,23,111,114,100,101,114,115,95,113,117,97,110,116,
87-
105,108,101,95,115,117,109,109,97,114,121,18,28,84,114,97,
88-
99,107,32,111,114,100,101,114,115,32,99,111,117,110,116,47,
89-
116,111,116,97,108,32,115,117,109,24,2,34,73,34,71,8,2,17,0,
90-
0,0,0,0,0,57,64,26,18,9,0,0,0,0,0,0,224,63,17,0,0,0,0,0,0,
91-
46,64,26,18,9,205,204,204,204,204,204,236,63,17,0,0,0,0,0,0,
92-
46,64,26,18,9,102,102,102,102,102,102,238,63,17,0,0,0,0,0,0,
93-
46,64>>,
86+
Expected = <<132, 1, 10, 23, 111, 114, 100, 101, 114, 115, 95, 113, 117, 97, 110, 116,
87+
105, 108, 101, 95, 115, 117, 109, 109, 97, 114, 121, 18, 28, 84, 114, 97,
88+
99, 107, 32, 111, 114, 100, 101, 114, 115, 32, 99, 111, 117, 110, 116, 47,
89+
116, 111, 116, 97, 108, 32, 115, 117, 109, 24, 2, 34, 73, 34, 71, 8, 2, 17, 0,
90+
0, 0, 0, 0, 0, 57, 64, 26, 18, 9, 0, 0, 0, 0, 0, 0, 224, 63, 17, 0, 0, 0, 0, 0, 0,
91+
46, 64, 26, 18, 9, 205, 204, 204, 204, 204, 204, 236, 63, 17, 0, 0, 0, 0, 0, 0,
92+
46, 64, 26, 18, 9, 102, 102, 102, 102, 102, 102, 238, 63, 17, 0, 0, 0, 0, 0, 0,
93+
46, 64>>,
9494
?_assertEqual(Expected,
9595
prometheus_protobuf_format:format()).
9696

@@ -99,12 +99,12 @@ test_quantile_dsummary(_) ->
9999
prometheus_quantile_summary:observe(quantile_dsummary, 1.5),
100100
prometheus_quantile_summary:observe(quantile_dsummary, 2.7),
101101

102-
Expected = <<101,10,17,113,117,97,110,116,105,108,101,95,100,115,117,109,
103-
109,97,114,121,18,3,113,119,101,24,2,34,73,34,71,8,2,17,205,
104-
204,204,204,204,204,16,64,26,18,9,0,0,0,0,0,0,224,63,17,154,
105-
153,153,153,153,153,5,64,26,18,9,205,204,204,204,204,204,
106-
236,63,17,154,153,153,153,153,153,5,64,26,18,9,102,102,102,
107-
102,102,102,238,63,17,154,153,153,153,153,153,5,64>>,
102+
Expected = <<101, 10, 17, 113, 117, 97, 110, 116, 105, 108, 101, 95, 100, 115, 117, 109,
103+
109, 97, 114, 121, 18, 3, 113, 119, 101, 24, 2, 34, 73, 34, 71, 8, 2, 17, 205,
104+
204, 204, 204, 204, 204, 16, 64, 26, 18, 9, 0, 0, 0, 0, 0, 0, 224, 63, 17, 154,
105+
153, 153, 153, 153, 153, 5, 64, 26, 18, 9, 205, 204, 204, 204, 204, 204,
106+
236, 63, 17, 154, 153, 153, 153, 153, 153, 5, 64, 26, 18, 9, 102, 102, 102,
107+
102, 102, 102, 238, 63, 17, 154, 153, 153, 153, 153, 153, 5, 64>>,
108108
?_assertEqual(Expected,
109109
prometheus_protobuf_format:format()).
110110

0 commit comments

Comments
 (0)