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