003 access log

✓ Passing This code compiles and runs correctly.

Code

input.k

Supporting Files

input.txt

Actual

requests 12 bytes 6144 errors 2 posts 2
endpoint /index hits 4 bytes 2048
endpoint /style hits 2 bytes 1024
endpoint /login hits 2 bytes 384
endpoint /missing hits 2 bytes 128
endpoint /api/data hits 2 bytes 2560

Expected output

requests 12 bytes 6144 errors 2 posts 2
endpoint /index hits 4 bytes 2048
endpoint /style hits 2 bytes 1024
endpoint /login hits 2 bytes 384
endpoint /missing hits 2 bytes 128
endpoint /api/data hits 2 bytes 2560

Flows

flow ~new click a branch to expand · @labels scroll to their anchor
new (totals, source: req: 0[i64], bytes: 0[i64], errs: 0[i64], posts: 0[i64])
flow ~new click a branch to expand · @labels scroll to their anchor
new (eps, capacity: 16, source: label: *std/string:String<std/string:instance!>, hits: i64, bytes: i64)
flow ~new click a branch to expand · @labels scroll to their anchor
new
flow ~print.ln click a branch to expand · @labels scroll to their anchor
print.ln (expr: "requests {{ totals.req:d }} bytes {{ totals.bytes:d }} errors {{ totals.errs:d }} posts {{ totals.posts:d }}")
flow ~query click a branch to expand · @labels scroll to their anchor
query (eps)

Test Configuration

MUST_RUN