简体   繁体   中英

How do I generate a report with Vanity?

Whenever I try to generate a report with Vanity, it creates an empty HTML file

>vanity report --output vanity.html
Vanity: loading experiments from ...
Vanity: loading metrics from ...
New report available in vanity.html

When viewing in the browser

Vanity's cached experiments are out of sync with those on the filesystem and/or those in the datastore. Please restart your server and/or turn on collecting.

I've already restarted the server several times, and ran through the the registration process several times.

>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

I was able to load the experiment page and see both color options. I have the track! code.

  if @user.save(validate: false)
    track! :register # Vanity

I even see the values in 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"

I even added model User to the metric, because it claimed to look at existing historical data.

metric "Registration" do
  description "Measures how many people signed up for our awesome service."
  model User
end

Reference http://vanity.labnotes.org/

@chloe this was a bug and closed in a3cc4f7 . It's been merged into the master branch and will be in the upcoming 1.9.1 release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM