Review Glossary FR

Size

Eyes

Finish a part in any dojo to unlock the next eyes.

Day 12 10 min

Sorting and counting

1 / 13 · ≈ 9 min left

The problem

The API got slow at 14:00 and you suspect one client is hammering it. You have pulled the client IPs out of the access log into a file. Now you want to know which IP sent the most requests, and which endpoints were the slowest.

The reps use 4 files. ips.txt holds 10 lines, one IP each, in arrival order: 10.0.0.7, 10.0.0.3, 10.0.0.7, 10.0.0.12, 10.0.0.3, 10.0.0.7, 10.0.0.9, 10.0.0.7, 10.0.0.12, 10.0.0.3. sizes.txt holds 5 numbers, one per line: 512, 64, 2048, 9, 128. requests.txt has 5 lines of path status ms separated by spaces, such as /api/users 500 1200 and /health 200 3. orders.csv has 4 lines of id,customer,total with no header, such as 102,omar,7.99.