require "lua_utils" -- Get from redis the throughput type bps or pps local throughput_type = getThroughputType() local now = os.time() function country2record(ifId, country) local record = {} record["key"] = tostring(country["country"]) local country_link = ""..country["country"]..'' record["column_id"] = getFlag(country["country"]).."  " .. country_link record["column_hosts"] = country["num_hosts"].."" record["column_since"] = secondsToTime(now - country["seen.first"] + 1) local sent2rcvd = round((country["egress"] * 100) / (country["egress"] + country["ingress"]), 0) record["column_breakdown"] = "