每当我尝试使用Vanity生成报告时,它都会创建一个空的HTML文件
>vanity report --output vanity.html
Vanity: loading experiments from ...
Vanity: loading metrics from ...
New report available in vanity.html
在浏览器中查看时
Vanity的缓存实验与文件系统和/或数据存储区中的实验不同步。请重新启动服务器和/或开启收集。
我已经多次重启服务器,并多次完成注册过程。
>rails server
Vanity: loading experiments from C:/.../experiments
Vanity: loading metrics from C:/.../experiments/metrics
[2014-03-14 04:53:34] INFO WEBrick 1.3.1
我能够加载实验页面并查看两种颜色选项。我有track!
代码。
if @user.save(validate: false)
track! :register # Vanity
我甚至在Redis中看到了值
redis 127.0.0.1:6379> keys *
1) "vanity:experiments:color_options:outcome"
2) "vanity:experiments:color_options:created_at"
3) "vanity:experiments:landing_page:alts:0:conversions"
4) "vanity:metrics:register:last_update_at"
5) "vanity:metrics:register:2014-03-14:value:0"
6) "scores"
7) "vanity:experiments:color_options:completed_at"
8) "vanity:experiments:color_options:alts:0:conversions"
10) "vanity:experiments:color_options:alts:1:conversions"
11) "vanity:experiments:color_options:alts:0:participants"
14) "vanity:experiments:color_options:alts:1:converted"
15) "vanity:experiments:color_options:alts:1:participants"
16) "vanity:experiments:landing_page:created_at"
我甚至在指标中添加了model User
,因为它声称会查看现有的历史数据。
metric "Registration" do
description "Measures how many people signed up for our awesome service."
model User
end