agg_dash.lua 641 B

1234567891011121314151617181920212223242526272829
  1. --[[
  2. This file is used as the aggregator file when using telemetry for
  3. scrape_dashing_full.lua
  4. ]]
  5. dashCount = 0
  6. dashTable = {}
  7. function increment_inner(table, key, value)
  8. table[key] = (table[key] or 0) + value
  9. end
  10. function increment(table, tableKey, key, value)
  11. if (table[tableKey] == nil) then
  12. table[tableKey] = {}
  13. end
  14. increment_inner(table[tableKey], key, value)
  15. end
  16. dofile("/tmp/lua-output")
  17. io.write("Total dashed effects is: ", dashCount, "\n")
  18. for k1, v1 in next, dashTable do
  19. io.write("\nTable: ", k1, "\n")
  20. for k, v in next, v1 do
  21. io.write("\"", k, "\": ", v, "\n")
  22. end
  23. end