Last active
August 29, 2015 13:57
-
-
Save dollschasingmen/9675643 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ScriptUtils | |
filename = ARGV[2] | |
puts "filename = #{filename}" | |
File.open(filename).each do |line| | |
assignment_id = line.chomp | |
stv = SplitTest.visitor_proxy(assignment_id).assignment_visitor_split('mobile_create_account_require_dob', control: 'control').downcase | |
puts "#{assignment_id}, #{stv}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[utils.tap :as tap]) | |
(defn visit-level-tap | |
[path] | |
(tap/hfs-sqldump path | |
:outfields (concat | |
["!visit_id" | |
"!visit_timestamp" | |
"!app_name" | |
"!mobile_assignment_id_out" | |
"!client_id_out" | |
"!preferred_language_out" | |
"!signup_user_id_out" | |
"!user_id_out"] | |
(map #(str % "_out") sum-vars) | |
(map #(str % "_unique") sum-vars)) | |
:outclasses (concat | |
[String | |
Long | |
String | |
String | |
String | |
String | |
Integer | |
Integer] | |
(repeat 10 Integer)))) | |
;; (use 'reports.visits.mobilevpr)(test-from-visit-level-data) | |
(defn test-from-visit-level-data | |
[] | |
(let [source (visit-level-tap (dev/get-path "misc/mobile_visit_facts"))] | |
(?- (stdout) (report-query source [159] (dev/get-path :split-tests) st/dev-split-test-runs-path st/dev-split-test-variants-path)))) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include ScriptUtils | |
filename = ARGV[2] | |
puts "filename = #{filename}" | |
stp = Reports::Upr::SplitTestProxy.new | |
stp.load! | |
def get_signup_assignment_id(user) | |
return "n/a" unless user | |
if user.respond_to?(:signup_assignment_id) | |
id = user.signup_assignment_id | |
else | |
id = user[:signup_assignment_id] || user[:id].to_s | |
end | |
id | |
end | |
File.open(filename).each do |line| | |
assignment_id, user_id = line.chomp.split("\t") | |
user = User.find_by_id(user_id) | |
signup_assignment_id = get_signup_assignment_id(user) | |
id_match = signup_assignment_id.chomp == assignment_id.chomp ? "match" : "no_match" | |
stv = stp.active_assignments_for_user(user)["mobile_create_account_require_dob"] | |
puts "#{id_match}, #{user_id}, #{assignment_id}, #{signup_assignment_id}, #{stv}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment