Giter Club home page Giter Club logo

boomerang's People

Contributors

bbrewer avatar bluesmoon avatar chirags avatar chmac avatar dguzzo avatar dweitemeyer avatar edgarklein avatar erikfried avatar hanoii avatar jhmartin avatar okuryu avatar xzyfer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

boomerang's Issues

Cannot set cookie in IE

I'm getting the following error in IE:

LOG: boomerang.rt: [error] cannot set start cookie

I found that commenting out these lines resolves the issue:

            ((typeof domain !== "undefined") ? "; domain="
                    + (domain !== null ? domain : impl.site_domain ) : "") +

in the debugger: impl.site_domain = "localhost"

Any suggestions?

finish() changes

sendBeacon should be called after the cookie is set (right before "this.running = false", instead of right after "this.complete = true") so that we can access the "t" property of the cookie.

Additionally, the "t" property should be passed to the beacon script.

Access to the "t" property is helpful when trying to detect duplicate entries in the beacon script, and prevent recording multiple entries with the same data.

Firefox and IE

I have seen different o.t_load, o.bw and o.lat values in IE and FF. Am I doing anything wrong?

Console output doesn't work for iPhone/iPad

I get a warning here:

else if(typeof console !== "undefined" && typeof console.log !== "undefined") {
boomr.log = function(m,l,s) { console.log(s + ": [" + l + "] ", m); };
}

patched temporary by replacing the last comma with a plus operator within the console.log function reducing the number or args to 1. I don't know the best way to fix. Any suggestions?

Setting user_ip from a cookie

I'm trying to build a totally static site so as to be able to serve all pages from cache. In order to do that, I'm thinking about getting boomerang's user_ip value from a cookie. I'd ideally set it in a header, but I can't find any way to read the header within Javascript. By doing so, I can have the varnish server set the user's ip in a Set-Cookie header, and keep the whole site in varnish.

So far I've got varnish setting the header. I've got a solid handle on how to get the value from document.cookie, although I'm still wrapping my head around ipv6 compatibility.

Any feedback before I charge ahead? Am I barking up the wrong tree?

Cheers - Callum.

Ajax api call with relative url

Boomerang is overriding url logic of jquery ajax call.
We use relative url to load static json file from the server with jquery ajax.
Let's say we have a json file with path:
http://www.example.com/json/my.json
var r_url = 'json/my.json'
$.ajax({
url: r_url,
type: "GET",
async: false,
timeout: 10000, // 10 seconds
success: function() {
},
error: function() {
});

Suppose current page is http://www.example.com/some/page
The actual url of the api becomes
http://www.example.com/some/page/json/my.json

We don't have this problem without boomerang library.
After investigating, we found that boomerang is making the ajax api call not jquery.
I think boomerang is overriding the relative url logic of jquery and cause the problem.

Thanks.

IE 7 and 8, time done is not showing up

Hi,

I have the code attached on the bottom. Basically copied from the help and your pages. It works fine in FireFox, but in IE it says that t_done is undefined, and it never shows me the time. I tried on IE 8 and IE7. The code is sitting inside of an MVC3 application w/ Razor. I included the entire page's code, just in case I'm doing something wrong..

@{
Layout = null;
}

<title>SomeOtherPage</title> Page #2.
<div>
    <p id="results"></p>


    <script src="../../Scripts/Boomerang/boomerang.js" type="text/javascript"></script>
    <script type="text/javascript">
        alert('aa');
        BOOMR.subscribe('before_beacon', function (o) {
            alert('aaa');
            var html = "";
            if (o.t_done) { html += "This page took " + o.t_done + "ms to load<br>"; }
            else { html += "We are missing the load time for some reason.. Done is not hitting.. <br />"; }

            if (o.bw) { html += "Your bandwidth to this server is " + parseInt(o.bw / 1024) + "kbps (&#x00b1;" + parseInt(o.bw_err * 100 / o.bw) + "%)<br>"; }
            if (o.lat) { html += "Your latency to this server is " + parseInt(o.lat) + "&#x00b1;" + o.lat_err + "ms<br>"; }

            document.getElementById('results').innerHTML = html;

            alert(o.t_done);
        });
    </script>
</div>

@(Html.ActionLink("Some Other Page", "SomeOtherPage"))
<script type="text/javascript"> //$(document).ready(function () { alert('a'); BOOMR.init({ user_ip: '10.0.0.1', BW: { base_url: '../../Content/Images/', cookie: 'HOWTO-BA' }, RT: { cookie: 'HOWTO-RT' } }); //}); </script>

How to retrieve the stored data..?

I am using boomerang.js to get the page loading time. the result will be displays in same page. I want to store that data in objects and how to retrieve that data whenever we needed?

t_done not send if navapi enabled, BW enabled, HTTPS, and no perf API

Hi, just to let you know after several testings that in case you are navigating using HTTPS, you have including navapi, and the browser you use does not super WebPerfAPI, then the performance is not measured.

If you comment out the if clause where BW monitor control checks if running https, then it works.

Does it make sense to you?

Thank and regards.

Make the timers available on the before_beacon event

I was working to create a visualization similar to the episodes framework, not sure if you've seen it, but it's a graphic timeline of the timers, with an idea of where along the timeline each timer was started and its duration.

I noticed that right now, the only thing I have on the before_beacon event is the vars, which I admin it's about the only information useful for statistics, but I wonder what harm could it make to make a little bit more things available to it?

I am talking specifically about.
// If we reach here, all plugins have completed
impl.fireEvent("before_beacon", impl.vars);

What about making the whole impl object available?

Probably a bit too much, and what about making also impl.timers available?

Something like:
// If we reach here, all plugins have completed
impl.fireEvent("before_beacon", impl.vars, impl.timers);

I don't mind rolling a patch on my fork, but may for this one it was worth the question first.

t_page and t_resp not calculated when using Cookie

I noticed that the following time values are not calculated when using the cookie, but they should be known:

t_page
[optional] Time taken from the head of the page to page_ready.
t_resp
[optional] Time taken from the user initiating the request to the first byte of the response.

Extremely high or low t_done values

We're seeing some outrageously high t_done values from BlackBerry devices. Here's a few examples:
t_done=1332824651142, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1334395941323, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9860; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1334395918226, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9860; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1335025506071, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1335036029722, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9810; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1335036029867, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9810; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.585 Mobile Safari/534.11+"
t_done=1332729963010, user_agent="Mozilla/5.0 (BlackBerry; U; BlackBerry 9360; en-GB) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.0.0.530 Mobile Safari/534.11+"

Any idea what's going on with these values? Here's a few others from the other end of the spectrum, these all returned t_done=-536870912, some of the user agents are:
"Mozilla/5.0 (Linux; U; Android 2.1-update1; en-gb; SonyEricssonE15i Build/2.0.2.A.0.24) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
"Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; WX445 Build/VZW) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
"Mozilla/5.0 (Linux; U; Android 2.1-update1; en-gb; GT-I5700 Build/ECLAIR) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
"Mozilla/5.0 (Linux; U; Android 2.1; en-us; pandigitalopp12/sourceidDL00000013) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
"Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; T-Mobile_Espresso Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"

Those t_done times are over 40 years, so it seems unlikely our pages took that long to load!

Any advice or articles on how to filter and analyse boomerang data? I read the slides of a few presentations (maybe?) by boomerang authors. What does the "one number to rule them all" slide mean btw?

Use Google Chrome APIs

Google Chrome provides a plethora of useful methods that boomerang should make use of in their chrome.loadTimes and chrome.csi APIs. chromium.Interval could also be useful for high-resolution timing.

Getting negative values for t_done with angularjs plugin

Hi,
I am using boomerangjs with angular plugin. My build includes rt, bw and angular plugins. The version is latest from git. For specific angular soft navigation changes, i am getting t_done as negative on the beacon received back. Please find below one of the events converted to key/value pairs. Its not always but only for specific soft navigation urls. I am using it from a local browser, so i know the response is fairly quick but don't understand how it can be negative.

Mon Jul 25 11:11:53 2016 : rt_start=manual v=0.9 vis_st=visible ua_plt=Linux_x86_64 ua_vnd=Google_Inc. bw=44368532 bw_err=24730676.15 lat=13 lat_err=6.96 bw_time=1469425309 nu=http://127.0.0.1/app/xxxxx/xxxxxxx rt_tstart=1469425312313 rt_bstart=1469425305236 rt_end=1469425304810 t_done=-7503 r=http://127.0.0.1/XYZ u=http://127.0.0.1/app/xxxxx/xxxxxxx-*?_g_(refreshInterval:(display:Off,pause:!f,value:0),time:(from:now%2Fw,mode:quick,to:now%2Fw))&_a_(tab:indexedFields) http_initiator=spa

I would like to understand on what conditions, t_done can get back a negative value? I am seeing this behaviour only while using it with angular plugins.

-Raja

Prevent execute html content before boomerang.js finished

situation is:

Javascript boomerang.js used as test of client net speed, problem is that html content is executed by browser and is not waiting for boomerang result. But boomerang result is needed because there are some changes in html content.

How it is possible to do not execute html content before boomernag.js has result?

   <!DOCTYPE html>
   <html lang="en">
   <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel='stylesheet' type='text/css' media='all' href='css/style.css' />
    <link rel='stylesheet' type='text/css' media='all' href='css/colorbox.css' />
    <script type="text/javascript" src="js/speedtest/boomerang.min.js"></script>
    <script>
      BOOMR.init({ beacon_url: "http://www.zzz.xx", user_ip: '10.0.0.1', site_domain: "http://www.zzz.xx", BW: { nruns: 3, base_url: 'http://www.zzz.xx/test_images/', cookie: 'SPEED-test'}});
      </script>
       <script type="text/javascript" src="js/preload.js"></script>

preload.js is just check cookies and if exist do not make test again, if does not, run speedtest by BOOMR.subscribe

          var version_set=getCookie("speedtest_version_set");

         if (version_set == "low"){

                                  $(document).ready(website_init_low);      

           } else if (version_set == "high"){

                                  $(document).ready(website_init_high);

                } else {


             BOOMR.subscribe('before_beacon', function(o) {  

              if(o.bw) {  
                          netspeed = Math.abs(parseInt(o.bw*8/1024)); 
               var netspeed_limit = 5000; 

          if (netspeed < netspeed_limit) { 

                     document.cookie="speedtest_version_set = low";
                     $(document).ready(website_init_low);

            } else {
                    document.cookie="speedtest_version_set = high";  
                    $(document).ready(website_init_high);


            }

   }
     });

           }

Enabling beacon and bandwidth tests using HTTPS

You said, in follow-up to Issue #18: "yeah, my guess is that no one really runs it over HTTPS. There was a similar bug someone emailed me about but regarding their own plugin."

@bluesmoon, I do actually need to run boomerang beacon over HTTPS, especially including bandwidth/latency tests. Also, the image GETs really need to run over HTTPS as well for my test scenario.

Before I look into this further, is this something that just needs some attention and testing, or are there significant issues blocking this (i.e., "SSL stuff will mess up b/w calculations").

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.