Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/chroma-js/test/cache-performance.coffee')
-rw-r--r--node_modules/chroma-js/test/cache-performance.coffee19
1 files changed, 19 insertions, 0 deletions
diff --git a/node_modules/chroma-js/test/cache-performance.coffee b/node_modules/chroma-js/test/cache-performance.coffee
new file mode 100644
index 0000000000..74005984fd
--- /dev/null
+++ b/node_modules/chroma-js/test/cache-performance.coffee
@@ -0,0 +1,19 @@
+require 'es6-shim'
+vows = require 'vows'
+assert = require 'assert'
+chroma = require '../chroma'
+
+
+
+s = chroma.scale('RdYlGn')
+ .mode('lab')
+ .domain([0,100000], 10)
+
+t0 = new Date().getTime()
+
+for i in [1..100000]
+ s(i).hex()
+
+t1 = new Date().getTime()
+
+console.log (t1 - t0) + "ms"