Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Unified Diff: tools/lua/agg_dash.lua

Issue 288883003: Add lua scripts to scrape dashing info (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/lua/scrape_dashing_full.lua » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lua/agg_dash.lua
diff --git a/tools/lua/agg_dash.lua b/tools/lua/agg_dash.lua
new file mode 100755
index 0000000000000000000000000000000000000000..37dffe1dde039650e37a917c459b612fa2e8a283
--- /dev/null
+++ b/tools/lua/agg_dash.lua
@@ -0,0 +1,29 @@
+--[[
+ This file is used as the aggregator file when using telemetry for
+ scrape_dashing_full.lua
+]]
+
+dashCount = 0
+dashTable = {}
+
+function increment_inner(table, key, value)
+ table[key] = (table[key] or 0) + value
+end
+
+function increment(table, tableKey, key, value)
+ if (table[tableKey] == nil) then
+ table[tableKey] = {}
+ end
+ increment_inner(table[tableKey], key, value)
+end
+
+dofile("/tmp/lua-output")
+
+io.write("Total dashed effects is: ", dashCount, "\n")
+for k1, v1 in next, dashTable do
+ io.write("\nTable: ", k1, "\n")
+ for k, v in next, v1 do
+ io.write("\"", k, "\": ", v, "\n")
+ end
+end
+
« no previous file with comments | « no previous file | tools/lua/scrape_dashing_full.lua » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698