bench-tocsv.lua 470 B

1234567891011121314151617
  1. #!/usr/bin/lua
  2. print("Benchmark,Implementation,N,Time")
  3. while true do
  4. local line1 = io.read("*l")
  5. if not line1 then break end
  6. local line2 = assert(io.read("*l"))
  7. local _ = assert(io.read("*l"))
  8. local _ = assert(io.read("*l"))
  9. local _ = assert(io.read("*l"))
  10. local name, impl, i = string.match(line1, "RUN (%S+) (%S+) (%S+)")
  11. local time = string.match(line2, "real (%S+)")
  12. print(table.concat({name,impl,i,time}, ","))
  13. end