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
slids = [] | |
hash = {"not_working_users"=>0, "all_users" => 0, "error_messages" => 0, "ice_connection_failure"=>0, "not_connected_to_peer" => 0, "signal_did_not_get_client" => 0, "reconnect_with_data" => 0, 'reconnect_no_speed' => 0, 'reconnect_no_data_channel' => 0, 'server_not_connected' => 0, "no_logs" => 0, "doesn't_work_always" => 0} | |
all_users = [] | |
not_working_users = [] | |
SummaryLog.where("webrtc_state=3 and region='eu-west-1' and user_browser='firefox' and created_at between '2014-12-17' and '2014-12-18'").each do |sl| | |
content=`curl -s -u "admin:Ch0c0lat3s" -H "Content-Type: application/json" -H "Accept: application/json" "http://templog.browserstack.com/logs_json?live_session_id=#{sl.session_id}"`.strip | |
logs = JSON.parse(content) | |
messages = logs.map{|x| x["message"]} | |
if !(messages.include?("terminal_connected") || messages.include?("signalling_offer")) | |
hash['server_not_connected'] += 1 |
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
(with-db "20150123" | |
(def reconnects (get-sessions {:message {$in ["client_reconnecting", "client_reconnecting_with_data"]} "json_data.clientBrowser" "chrome"})) | |
(defn msg-counter [msgs collections] (map (fn [sid] (hash-map :s sid :rc (count-occurances {:message {$in msgs}} sid))) collections)) | |
(defn reconnects-n [n] (map :s (filter #(= 1 (:rc %)) (msg-counter ["client_reconnecting", "client_reconnecting_with_data"] reconnects)))) | |
(def reconnects-1 (reconnects-n 1)) | |
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
; reconnects single | |
(with-db "20150205" | |
(def reconnects (get-sessions {:message {$in ["client_reconnecting", "client_reconnecting_with_data"]} "json_data.clientBrowser" "chrome"})) | |
(defn msg-counter [msgs collections] (map (fn [sid] (hash-map :s sid :rc (count-occurances {:message {$in msgs}} sid))) collections)) | |
(defn reconnects-n [n] (map :s (filter #(= n (:rc %)) (msg-counter ["client_reconnecting", "client_reconnecting_with_data"] reconnects)))) | |
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
(defn fallback-stats [d b] (with-db d | |
(def old-buckets buckets) | |
(def browser (if (= b "chrome") chrome? (complement chrome?))) | |
(defn div [bucket query] (filter (partial query) bucket)) | |
(defn sub [bucket res] (clojure.set/difference (set bucket) (set res))) |
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
define([ | |
'intern!object', | |
'intern/chai!assert', | |
'require', | |
'intern/dojo/node!leadfoot/Command', | |
'intern/dojo/Promise', | |
'./intern' | |
], function (registerSuite, assert, require, Command, Promise, config, registry) { | |
var parallelRegister = function (descriptor) { | |
var test; |
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
var http = require('http'); | |
var agent; | |
if(process.version.substring(0,5) == 'v0.10'){ | |
var AgentKeepAlive = require('agentkeepalive'); | |
agent = new AgentKeepAlive({ | |
keepAliveTimeout: 30*1000 | |
}); | |
} | |
else { |