多维数据集生成无法解释的数字

我正在尝试使用Cube构build一个dynamic的大数据分析工具。 事情是,我正在使用这个产生testing数据:

process.env.TZ = 'UTC'; var util = require("util"), cube = require("../../"), // replace with require("cube") options = require("./random-config"); util.log("starting emitter"); var emitter = cube.emitter(options["collector"]); var start = Date.now() + options["offset"], stop = start + options["duration"], step = options["step"], value = 0, count = 0; while (start < stop) { emitter.send({ type: "visit", time: new Date(start), data: { os: "windows", ip: "192.168.2.2", language: "Dutch", article_id: Math.floor(Math.random() * 50) } }); start += step * Math.random(); ++count; } util.log("sent " + count + " events"); util.log("stopping emitter"); emitter.close(); 

这样,大约有14000条logging被执行时被推入MongoDB。

当去localhost:1081/1.0/metric?expression=sum(visit)&step=1e4&start=2014-01-14T08:00:00Z&end=2014-01-19T08:00:00Z然而,那里显示的数据没有匹配正在推入的数据。我一直看到约2000 visits时,查看该页面,并增加了数字,造成大大不准确的graphics。

有没有人有关于立方体的想法或资源? 我喜欢Cube的想法,但缺乏文档,浪费了很多时间。

Interesting Posts