Skip to content

Commit b054b9d

Browse files
committed
chore: reformat spacing for correctness
1 parent ed7b094 commit b054b9d

File tree

2 files changed

+106
-106
lines changed

2 files changed

+106
-106
lines changed

lib/slowlog_check.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def last_datadog_metric
5656
series
5757
.first
5858
.fetch("pointlist")
59-
.map {|x| x[0]}
59+
.map { |x| x[0] }
6060
.max
6161
.to_i / 1000
6262
)
@@ -82,7 +82,7 @@ def reporting_interval
8282
now_i = minute_precision(Time.now).to_i - 60
8383
start_time_i = last_time_submitted.to_i + 60
8484
times = (start_time_i..now_i).step(60).to_a
85-
Hash[times.collect {|time| [Time.at(time), {}]}]
85+
Hash[times.collect { |time| [Time.at(time), {}] }]
8686
end
8787

8888
def _95percentile(sorted_values)
@@ -93,7 +93,7 @@ def _95percentile(sorted_values)
9393
def add_metric_to_bucket(prior, new)
9494
new_values = prior[:values].push(new)
9595
new_count = new_values.length
96-
new_avg = ((prior[:avg] * prior[:count]) + new) / new_count
96+
new_avg = ((prior[:avg] * prior[:count]) + new) / new_count
9797

9898
sorted_values = new_values.sort
9999
new_median = sorted_values[(sorted_values.count / 2) - 1]
@@ -118,7 +118,7 @@ def did_i_get_it_all?(slowlog)
118118
slowlog[-1][0] == 0
119119
end
120120

121-
def redis_slowlog(length=128)
121+
def redis_slowlog(length = 128)
122122
resp = @redis.slowlog('get', length)
123123

124124
return resp if length > MAXLENGTH
@@ -174,7 +174,7 @@ def slowlogs_by_flush_interval
174174
break if minute_precision(time) <= minute_precision(last_time_submitted)
175175

176176
command = slowlog[3][0]
177-
value = slowlog_microseconds(slowlog)
177+
value = slowlog_microseconds(slowlog)
178178
bucket = minute_precision(time)
179179

180180
if result[bucket].nil?

0 commit comments

Comments
 (0)