Skip to content

Commit 3c76868

Browse files
Ravjot BrarRavjot Brar
authored andcommitted
Fix indentation
Signed-off-by: Ravjot Brar <Ravjot.Brar@MacBookPro.lan>
1 parent 7e35e9b commit 3c76868

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tools/valkey-metrics/src/analyzers/calculateHotKeys.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ export const calculateHotKeys = () => {
66
const ACCESS_COMMANDS = ["get", "set", "mget", "hget", "hgetall", "hmget", "json.get", "json.mget"]
77
const CUT_OFF_FREQUENCY = 1
88

9-
return R.pipe(
9+
return R.pipe(
1010
R.reduce((acc, { ts, command }) => {
11-
const [cmd, ...args] = command.split(" ").filter(Boolean)
12-
13-
if (ACCESS_COMMANDS.includes(cmd.trim().toLowerCase())) {
11+
const [cmd, ...args] = command.split(' ').filter(Boolean)
12+
if (ACCESS_COMMANDS.includes(cmd.trim().toLowerCase())) {
1413
args.forEach(key => {
15-
acc[key] = acc[key] ? acc[key] + 1 : 1
14+
acc[key] = acc[key] ? acc[key] + 1 : 1
1615
})
17-
}
18-
return acc
16+
}
17+
return acc
1918
}, {}),
2019
R.toPairs,
2120
R.sort(R.descend(R.last)),
22-
R.reject(([key, count]) => count <= CUT_OFF_FREQUENCY),
23-
)(rows)
21+
R.reject(([key, count]) => count <= CUT_OFF_FREQUENCY)
22+
)(rows)
2423
}
2524

0 commit comments

Comments
 (0)