diff options
Diffstat (limited to 'tools/lua/scrape.lua')
-rw-r--r-- | tools/lua/scrape.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/lua/scrape.lua b/tools/lua/scrape.lua new file mode 100644 index 0000000000..1d9cda91fe --- /dev/null +++ b/tools/lua/scrape.lua @@ -0,0 +1,15 @@ +canvas = {} +total = 0 +function accumulate(verb) + total = total + 1 + n = canvas[verb] or 0 + n = n + 1 + canvas[verb] = n +end +function summarize() + io.write('total='..total..' ') + for k, v in next, canvas do + io.write(k..'='..v..' ') + end +end + |