Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove whitespace [Gun.io WhitespaceBot]

  • Loading branch information...
commit 9efc280bb7e1ae3ecda2f1b9dbf85b1ba2f86173 1 parent b95e7da
Gun.io Whitespace Robot authored
View
20 .gitignore
@@ -0,0 +1,20 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Logs and databases #
+######################
+*.log
+
+# OS generated files #
+######################
+.DS_Store*
+ehthumbs.db
+Icon?
+Thumbs.db
View
24 LICENSE.txt
@@ -3,8 +3,8 @@ Software Copyright License Agreement (BSD License)
Copyright (c) 2010, Yahoo! Inc.
All rights reserved.
-Redistribution and use of this software in source and binary forms,
-with or without modification, are permitted provided that the following
+Redistribution and use of this software in source and binary forms,
+with or without modification, are permitted provided that the following
conditions are met:
* Redistributions of source code must retain the above
@@ -21,15 +21,15 @@ conditions are met:
derived from this software without specific prior
written permission of Yahoo! Inc.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
2  Makefile
@@ -1,7 +1,7 @@
# Copyright (c) 2011, Yahoo! Inc. All rights reserved.
# Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms.
-PLUGINS :=
+PLUGINS :=
VERSION := $(shell sed -ne '/^BOOMR\.version/{s/^.*"\([^"]*\)".*/\1/;p;q;}' boomerang.js)
DATE := $(shell date +%s)
View
158 boomerang.js
@@ -100,7 +100,7 @@ boomr = {
}
name = ' ' + name + '=';
-
+
var i, cookies;
cookies = ' ' + d.cookie + ';';
if ( (i=cookies.indexOf(name)) >= 0 ) {
@@ -108,10 +108,10 @@ boomr = {
cookies = cookies.substring(i, cookies.indexOf(';', i));
return cookies;
}
-
+
return null;
},
-
+
setCookie: function(name, subcookies, max_age, path, domain, sec) {
var value = "",
k, nameval, c,
@@ -120,7 +120,7 @@ boomr = {
if(!name) {
return false;
}
-
+
for(k in subcookies) {
if(subcookies.hasOwnProperty(k)) {
value += '&' + encodeURIComponent(k)
@@ -128,13 +128,13 @@ boomr = {
}
}
value = value.replace(/^&/, '');
-
+
if(max_age) {
exp = new Date();
exp.setTime(exp.getTime() + max_age*1000);
exp = exp.toGMTString();
}
-
+
nameval = name + '=' + value;
c = nameval +
((max_age) ? "; expires=" + exp : "" ) +
@@ -142,16 +142,16 @@ boomr = {
((typeof domain !== "undefined") ? "; domain="
+ (domain !== null ? domain : impl.site_domain ) : "") +
((sec) ? "; secure" : "");
-
+
if ( nameval.length < 4000 ) {
d.cookie = c;
// confirm cookie was set (could be blocked by user's settings, etc.)
return ( value === this.getCookie(name) );
}
-
+
return false;
},
-
+
getSubCookies: function(cookie) {
var cookies_a,
i, l, kv,
@@ -160,26 +160,26 @@ boomr = {
if(!cookie) {
return null;
}
-
+
cookies_a = cookie.split('&');
-
+
if(cookies_a.length === 0) {
return null;
}
-
+
for(i=0, l=cookies_a.length; i<l; i++) {
kv = cookies_a[i].split('=');
kv.push(""); // just in case there's no value
cookies[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1]);
}
-
+
return cookies;
},
-
+
removeCookie: function(name) {
return this.setCookie(name, {}, 0, "/", null);
},
-
+
pluginConfig: function(o, config, plugin_name, properties) {
var i, props=0;
@@ -201,7 +201,7 @@ boomr = {
init: function(config) {
var i, k,
properties = ["beacon_url", "site_domain", "user_ip"];
-
+
if(!config) {
config = {};
}
@@ -239,7 +239,7 @@ boomr = {
this.plugins[k].init(config);
}
}
-
+
// The developer can override onload by setting autorun to false
if(typeof config.autorun === "undefined" || config.autorun !== false) {
impl.addListener(w, "load",
@@ -250,14 +250,14 @@ boomr = {
}
// webkitvisibilitychange is useful to detect if the page loaded through prerender
- impl.addListener(d, "webkitvisibilitychange",
+ impl.addListener(d, "webkitvisibilitychange",
function() {
impl.fireEvent("visibility_changed");
}
);
// This must be the last one to fire
impl.addListener(w, "unload", function() { w=null; });
-
+
return this;
},
@@ -354,7 +354,7 @@ boomr = {
sendBeacon: function() {
var k, url, img, nparams=0;
-
+
// At this point someone is ready to send the beacon. We send
// the beacon only if all plugins have finished doing what they
// wanted to do
@@ -368,7 +368,7 @@ boomr = {
}
}
}
-
+
// If we reach here, all plugins have completed
impl.fireEvent("before_beacon", impl.vars);
@@ -380,7 +380,7 @@ boomr = {
// use document.URL instead of location.href because of a safari bug
url = impl.beacon_url + '?v=' + encodeURIComponent(BOOMR.version) +
'&u=' + encodeURIComponent(d.URL.replace(/#.*/, ''));
-
+
for(k in impl.vars) {
if(impl.vars.hasOwnProperty(k)) {
nparams++;
@@ -388,7 +388,7 @@ boomr = {
+ "=" + encodeURIComponent(impl.vars[k]);
}
}
-
+
// only send beacon if we actually have something to beacon back
if(nparams) {
img = new Image();
@@ -810,7 +810,7 @@ var impl = {
// numeric comparator. Returns negative number if a < b, positive if a > b and 0 if they're equal
// used to sort an array numerically
ncmp: function(a, b) { return (a-b); },
-
+
// Calculate the interquartile range of an array of data points
iqr: function(a)
{
@@ -818,20 +818,20 @@ var impl = {
q1 = (a[Math.floor(l*0.25)] + a[Math.ceil(l*0.25)])/2;
q3 = (a[Math.floor(l*0.75)] + a[Math.ceil(l*0.75)])/2;
-
+
fw = (q3-q1)*1.5;
-
+
l++;
-
+
for(i=0; i<l && a[i] < q3+fw; i++) {
if(a[i] > q1-fw) {
b.push(a[i]);
}
}
-
+
return b;
},
-
+
calc_latency: function()
{
var i, n,
@@ -839,14 +839,14 @@ var impl = {
amean, median,
std_dev, std_err,
lat_filtered;
-
+
// We first do IQR filtering and use the resulting data set
// for all calculations
lat_filtered = this.iqr(this.latencies.sort(this.ncmp));
n = lat_filtered.length;
-
+
BOOMR.debug(lat_filtered, "bw");
-
+
// First we get the arithmetic mean, standard deviation and standard error
// We ignore the first since it paid the price of DNS lookup, TCP connect
// and slow start
@@ -854,28 +854,28 @@ var impl = {
sum += lat_filtered[i];
sumsq += lat_filtered[i] * lat_filtered[i];
}
-
+
n--; // Since we started the loop with 1 and not 0
-
+
amean = Math.round(sum / n);
-
+
std_dev = Math.sqrt( sumsq/n - sum*sum/(n*n));
-
+
// See http://en.wikipedia.org/wiki/1.96 and http://en.wikipedia.org/wiki/Standard_error_%28statistics%29
std_err = (1.96 * std_dev/Math.sqrt(n)).toFixed(2);
-
+
std_dev = std_dev.toFixed(2);
-
-
+
+
n = lat_filtered.length-1;
-
+
median = Math.round(
(lat_filtered[Math.floor(n/2)] + lat_filtered[Math.ceil(n/2)]) / 2
);
-
+
return { mean: amean, median: median, stddev: std_dev, stderr: std_err };
},
-
+
calc_bw: function()
{
var i, j, n=0,
@@ -884,14 +884,14 @@ var impl = {
amean, std_dev, std_err, median,
amean_corrected, std_dev_corrected, std_err_corrected, median_corrected,
nimgs, bw, bw_c;
-
+
for(i=0; i<this.nruns; i++) {
if(!this.results[i] || !this.results[i].r) {
continue;
}
-
+
r=this.results[i].r;
-
+
// the next loop we iterate through backwards and only consider the largest
// 3 images that succeeded that way we don't consider small images that
// downloaded fast without really saturating the network
@@ -904,24 +904,24 @@ var impl = {
if(r[j].t === null) {
continue;
}
-
+
n++;
nimgs++;
-
+
// multiply by 1000 since t is in milliseconds and not seconds
bw = images[j].size*1000/r[j].t;
bandwidths.push(bw);
-
+
bw_c = images[j].size*1000/(r[j].t - this.latency.mean);
bandwidths_corrected.push(bw_c);
}
}
-
+
BOOMR.debug('got ' + n + ' readings', "bw");
-
+
BOOMR.debug('bandwidths: ' + bandwidths, "bw");
BOOMR.debug('corrected: ' + bandwidths_corrected, "bw");
-
+
// First do IQR filtering since we use the median here
// and should use the stddev after filtering.
if(bandwidths.length > 3) {
@@ -931,10 +931,10 @@ var impl = {
bandwidths = bandwidths.sort(this.ncmp);
bandwidths_corrected = bandwidths_corrected.sort(this.ncmp);
}
-
+
BOOMR.debug('after iqr: ' + bandwidths, "bw");
BOOMR.debug('corrected: ' + bandwidths_corrected, "bw");
-
+
// Now get the mean & median.
// Also get corrected values that eliminate latency
n = Math.max(bandwidths.length, bandwidths_corrected.length);
@@ -948,24 +948,24 @@ var impl = {
sumsq_corrected += Math.pow(bandwidths_corrected[i], 2);
}
}
-
+
n = bandwidths.length;
amean = Math.round(sum/n);
std_dev = Math.sqrt(sumsq/n - Math.pow(sum/n, 2));
std_err = Math.round(1.96 * std_dev/Math.sqrt(n));
std_dev = Math.round(std_dev);
-
+
n = bandwidths.length-1;
median = Math.round(
(bandwidths[Math.floor(n/2)] + bandwidths[Math.ceil(n/2)]) / 2
);
-
+
n = bandwidths_corrected.length;
amean_corrected = Math.round(sum_corrected/n);
std_dev_corrected = Math.sqrt(sumsq_corrected/n - Math.pow(sum_corrected/n, 2));
std_err_corrected = (1.96 * std_dev_corrected/Math.sqrt(n)).toFixed(2);
std_dev_corrected = std_dev_corrected.toFixed(2);
-
+
n = bandwidths_corrected.length-1;
median_corrected = Math.round(
(
@@ -973,11 +973,11 @@ var impl = {
+ bandwidths_corrected[Math.ceil(n/2)]
) / 2
);
-
+
BOOMR.debug('amean: ' + amean + ', median: ' + median, "bw");
BOOMR.debug('corrected amean: ' + amean_corrected + ', '
+ 'median: ' + median_corrected, "bw");
-
+
return {
mean: amean,
stddev: std_dev,
@@ -989,13 +989,13 @@ var impl = {
median_corrected: median_corrected
};
},
-
+
defer: function(method)
{
var that=this;
return setTimeout(function() { method.call(that); that=null;}, 10);
},
-
+
load_img: function(i, run, callback)
{
var url = this.base_url + images[i].name
@@ -1003,7 +1003,7 @@ var impl = {
timer=0, tstart=0,
img = new Image(),
that=this;
-
+
img.onload=function() {
img.onload=img.onerror=null;
img=null;
@@ -1022,7 +1022,7 @@ var impl = {
}
that=callback=null;
};
-
+
// the timeout does not abort download of the current image, it just sets an
// end of loop flag so we don't attempt download of the next image we still
// need to wait until onload or onerror fire to be sure that the image
@@ -1036,17 +1036,17 @@ var impl = {
images[i].timeout
+ Math.min(400, this.latency ? this.latency.mean : 400)
);
-
+
tstart = new Date().getTime();
img.src=url;
},
-
+
lat_loaded: function(i, tstart, run, success)
{
if(run !== this.latency_runs+1) {
return;
}
-
+
if(success !== null) {
var lat = new Date().getTime() - tstart;
this.latencies.push(lat);
@@ -1056,26 +1056,26 @@ var impl = {
if(this.latency_runs === 0) {
this.latency = this.calc_latency();
}
-
+
this.defer(this.iterate);
},
-
+
img_loaded: function(i, tstart, run, success)
{
if(run !== this.runs_left+1) {
return;
}
-
+
if(this.results[this.nruns-run].r[i]) { // already called on this image
return;
}
-
+
// if timeout, then we set the next image to the end of loop marker
if(success === null) {
this.results[this.nruns-run].r[i+1] = {t:null, state: null, run: run};
return;
}
-
+
var result = {
start: tstart,
end: new Date().getTime(),
@@ -1087,7 +1087,7 @@ var impl = {
result.t = result.end-result.start;
}
this.results[this.nruns-run].r[i] = result;
-
+
// we terminate if an image timed out because that means the connection is
// too slow to go to the next image
if(i >= images.end-1
@@ -1105,7 +1105,7 @@ var impl = {
this.load_img(i+1, run, this.img_loaded);
}
},
-
+
finish: function()
{
if(!this.latency) {
@@ -1119,9 +1119,9 @@ var impl = {
lat_err: parseFloat(this.latency.stderr, 10),
bw_time: Math.round(new Date().getTime()/1000)
};
-
+
BOOMR.addVar(o);
-
+
// If we have an IP address we can make the BA cookie persistent for a while
// because we'll recalculate it if necessary (when the user's IP changes).
if(!isNaN(o.bw)) {
@@ -1139,18 +1139,18 @@ var impl = {
null
);
}
-
+
this.complete = true;
BOOMR.sendBeacon();
this.running = false;
},
-
+
iterate: function()
{
if(this.aborted) {
return false;
}
-
+
if(!this.runs_left) {
this.finish();
}
@@ -1196,7 +1196,7 @@ var impl = {
}
};
-
+
BOOMR.plugins.BW = {
init: function(config) {
var cookies;
View
2  dns.js
@@ -83,7 +83,7 @@ var impl = {
return true;
}
};
-
+
BOOMR.plugins.DNS = {
init: function(config) {
BOOMR.utils.pluginConfig(impl, config, "DNS", ["base_url"]);
View
4 doc/api/BOOMR.html
@@ -15,7 +15,7 @@
</p>
<p>
-To access any of the following, dereference the BOOMR object. eg: use <code>BOOMR.version</code>
+To access any of the following, dereference the BOOMR object. eg: use <code>BOOMR.version</code>
to get the <code>version</code> string.
</p>
@@ -66,7 +66,7 @@ <h2 id="config">Configuration</h2>
but unless your site is of the <code>foo.com</code> format, it will probably get it
wrong. It's a good idea to set this to whatever part of your domain you'd like to
share bandwidth and performance measurements across.<br>
-If you have multiple domains, then you're out of luck. You'll just have to get
+If you have multiple domains, then you're out of luck. You'll just have to get
separate measurements across them.
</dd>
View
2  doc/api/BOOMR.utils.html
@@ -10,7 +10,7 @@
<h1>BOOMR utility functions</h1>
<p>
All boomerang utility functions are under the <code>BOOMR.utils</code> namespace.
-To access any of the following, dereference the BOOMR.utils object. eg: use <code>BOOMR.utils.getCookie()</code>
+To access any of the following, dereference the BOOMR.utils object. eg: use <code>BOOMR.utils.getCookie()</code>
to call the <code>getCookie()</code> method.
</p>
View
4 doc/api/navtiming.html
@@ -12,8 +12,8 @@
<strong>Note:</strong> The Navigation Timing plugin hasn't been tested. Your help in testing it is appreciated.
</p>
<p>
-The Navigation Timing plugin collects metrics collected by modern user agents that support the
-<a href="http://w3c-test.org/webperf/specs/NavigationTiming/">W3C Navigation Timing</a> specification. The Navigation
+The Navigation Timing plugin collects metrics collected by modern user agents that support the
+<a href="http://w3c-test.org/webperf/specs/NavigationTiming/">W3C Navigation Timing</a> specification. The Navigation
Timing API is encapsulated within the <code>BOOMR.plugins.NavigationTiming</code> namespace.
</p>
View
2  doc/howtos/dynamic-content.txt
@@ -18,4 +18,4 @@ Quisque dolor dui, tempus eu euismod at, condimentum eget felis. Pellentesque do
Quisque volutpat scelerisque ipsum, ac vulputate lorem dapibus quis. Donec et diam nulla. Nunc pellentesque viverra egestas. Etiam eget neque magna, a venenatis ante. Nulla facilisi. Ut quis nisl vel felis vestibulum consectetur sed id dolor. Sed ac metus eu turpis elementum porttitor. Proin euismod accumsan dui, at aliquet dui aliquam vitae. Proin vitae euismod erat. Etiam tincidunt est at libero mollis egestas. Nunc vitae lectus quis velit ullamcorper gravida vel in purus. Fusce feugiat odio vel lorem viverra lacinia. Curabitur adipiscing condimentum arcu sit amet tempor. Proin eget leo arcu, ac dictum justo. Curabitur viverra ultrices lorem, nec aliquet odio dictum vitae. Nam at volutpat velit. Sed sed rutrum magna. Cras ut felis a nunc euismod laoreet.
-Cras euismod rhoncus erat, et placerat sem pulvinar at. Sed tempus libero nec arcu luctus hendrerit. In tincidunt vehicula pretium. Mauris nec orci a magna aliquet faucibus sed quis ligula. Nulla id lacus id eros iaculis mollis vel non risus. Nam eget libero quam. Nullam sed magna purus, eu pretium sapien. Curabitur ullamcorper, tellus vitae sodales accumsan, arcu erat egestas augue, et adipiscing turpis diam ullamcorper nunc. Suspendisse dignissim scelerisque porttitor. Integer quis congue mauris. Mauris dignissim viverra tincidunt. Duis viverra malesuada nisl. Maecenas libero orci, porta eget mattis sit amet, mollis ut sapien. Aenean vulputate felis vitae sem aliquam vulputate eu sed est. Nunc sed enim nisi, ac cursus massa. Praesent quam ligula, tristique ut tincidunt dapibus, facilisis pulvinar turpis. Mauris ut eros tortor, at semper nulla. Integer facilisis scelerisque mauris, eu congue purus placerat in. Aenean augue augue, lacinia vitae dapibus non, posuere vitae neque.
+Cras euismod rhoncus erat, et placerat sem pulvinar at. Sed tempus libero nec arcu luctus hendrerit. In tincidunt vehicula pretium. Mauris nec orci a magna aliquet faucibus sed quis ligula. Nulla id lacus id eros iaculis mollis vel non risus. Nam eget libero quam. Nullam sed magna purus, eu pretium sapien. Curabitur ullamcorper, tellus vitae sodales accumsan, arcu erat egestas augue, et adipiscing turpis diam ullamcorper nunc. Suspendisse dignissim scelerisque porttitor. Integer quis congue mauris. Mauris dignissim viverra tincidunt. Duis viverra malesuada nisl. Maecenas libero orci, porta eget mattis sit amet, mollis ut sapien. Aenean vulputate felis vitae sem aliquam vulputate eu sed est. Nunc sed enim nisi, ac cursus massa. Praesent quam ligula, tristique ut tincidunt dapibus, facilisis pulvinar turpis. Mauris ut eros tortor, at semper nulla. Integer facilisis scelerisque mauris, eu congue purus placerat in. Aenean augue augue, lacinia vitae dapibus non, posuere vitae neque.
View
2  doc/howtos/howto-0.html
@@ -179,7 +179,7 @@
<h2>Statistical analysis of the data</h2>
<p>
Once you've got your data, it's useful to do a bunch of statistical analysis on it. We'll cover this in a
-future howto, but for now, have a look at my ConFoo 2010 talk on
+future howto, but for now, have a look at my ConFoo 2010 talk on
<a href="http://www.slideshare.net/bluesmoon/index-3441823">the statistics of web performance</a>.
</p>
View
2  doc/howtos/howto-10-page#2.html
@@ -15,7 +15,7 @@
</p>
<p>
-If you clicked the link to this page from <a href="howto-10-page%231.html">Page #1</a>, you should see
+If you clicked the link to this page from <a href="howto-10-page%231.html">Page #1</a>, you should see
page performance results show up below. It may take a while if this is the first time you're doing
the test since testing your bandwidth takes about 6 seconds. You can also click the link to Page #1
to see the same output on Page #1.
View
2  doc/howtos/howto-1a-page#2.html
@@ -17,7 +17,7 @@
</p>
<p>
-If you clicked the link to this page from <a href="howto-1a-page%231.html">Page #1</a>, you should see
+If you clicked the link to this page from <a href="howto-1a-page%231.html">Page #1</a>, you should see
page performance results show up below. It may take a while if this is the first time you're doing
the test since testing your bandwidth takes about 6 seconds. You can also click the link to Page #1
to see the same output on Page #1.
View
2  doc/howtos/howto-1b-page#2.html
@@ -17,7 +17,7 @@
</p>
<p>
-If you clicked the link to this page from <a href="howto-1b-page%231.html">Page #1</a>, you should see
+If you clicked the link to this page from <a href="howto-1b-page%231.html">Page #1</a>, you should see
page performance results show up below. We introduce an artificial delay of 750ms to show how you can
fire the <code>page_ready</code> event after the page has loaded. It may take a while if this is the
first time you're doing the test since testing your bandwidth takes about 6 seconds. You can also click
View
14 doc/howtos/howto-2.html
@@ -40,15 +40,15 @@
<pre>
YUI().use("io-base", function(Y) {
var uri = "dynamic-content.txt";
-
+
function complete(id, o) {
var html = o.responseText;
document.getElementById("dynamic-content").innerHTML = html;
<em>BOOMR.plugins.RT.done(); // Tell boomerang to measure time and fire a beacon</em>
};
-
+
Y.on('io:complete', complete);
-
+
<em>BOOMR.plugins.RT.startTimer("t_done"); // Start measuring download time</em>
var request = Y.io(uri);
});
@@ -81,19 +81,19 @@
YUI().use("io-base", function(Y) {
var uri = "dynamic-content.txt?" + new Date().getTime();
-
+
function complete(id, o) {
var html = "<p>\n" + o.responseText.replace(/^$/mg, '</p>\n<p>') + "\n</p>";
document.getElementById("dynamic-content").innerHTML = html;
BOOMR.plugins.RT.done();
};
-
+
Y.on('io:complete', complete);
-
+
BOOMR.plugins.RT.startTimer("t_done");
var request = Y.io(uri);
});
-
+
</script>
</body>
</html>
View
2  doc/howtos/howto-4.html
@@ -42,7 +42,7 @@
</p>
<p>
-In the following examples, you'll need to make sure that <code>boomerang.js</code> is loaded and the
+In the following examples, you'll need to make sure that <code>boomerang.js</code> is loaded and the
<code>init()</code> method called before you call any of these methods, so perhaps putting it at the
top of your page is a good idea. We'll see later how to work around this.
</p>
View
2  doc/howtos/howto-5.html
@@ -31,7 +31,7 @@
<p>
The parameter name must be a string. We recommend only using alphanumeric characters and underscores,
-but you can really use anything you like. Parameter values may only be numbers or strings, ie,
+but you can really use anything you like. Parameter values may only be numbers or strings, ie,
something that you can put into a URL.
</p>
View
2  doc/howtos/howto-6.html
@@ -51,7 +51,7 @@
but unless your site is of the <code>foo.com</code> format, it will probably get it
wrong. It's a good idea to set this to whatever part of your domain you'd like to
share bandwidth and performance measurements across.<br>
-If you have multiple domains, then you're out of luck. You'll just have to get
+If you have multiple domains, then you're out of luck. You'll just have to get
separate measurements across them.
</dd>
View
2  doc/howtos/howto-7.html
@@ -62,7 +62,7 @@
<h2>Fake beacons that do not originate from a page you own</h2>
<p>
The most common reason for this kind of abuse is that someone really liked your page design and copied
-it to their own server, including the boomerang javascript, only they didn't update the beacon_url,
+it to their own server, including the boomerang javascript, only they didn't update the beacon_url,
so it still beacons to your server. You probably don't want this.
</p>
View
2  doc/howtos/howto-8.html
@@ -15,7 +15,7 @@
<strong>Note:</strong> The DNS plugin hasn't been tested. Your help in testing it is appreciated.
</p>
<p>
-Measuring DNS requires some server-side set up. The entire set up was
+Measuring DNS requires some server-side set up. The entire set up was
<a href="http://developer.yahoo.net/blog/archives/2009/11/guide_to_dns.html">documented in detail</a>
by Yahoo! engineer Carlos Bueno, so go read his post for everything you'll need to set
this up. In brief, the points he covers are:
View
6 doc/howtos/howto-9.html
@@ -12,8 +12,8 @@
<strong>Note:</strong> The Navigation Timing plugin hasn't been tested. Your help in testing it is appreciated.
</p>
-<p>The W3C Navigation Timing API is an interface implemented by modern browsers that
-provides broad and deep data related to the performance of page loads. At the time
+<p>The W3C Navigation Timing API is an interface implemented by modern browsers that
+provides broad and deep data related to the performance of page loads. At the time
of this writing, it is supported by the following browsers:</p>
<ul>
@@ -27,7 +27,7 @@
string.</p>
<p>You will have to build your own version of boomerang.js since it
-isn't one of the default plugins. To do this, run <code>make</code> in the
+isn't one of the default plugins. To do this, run <code>make</code> in the
boomerang directory with the following option:</p>
<pre>
View
2  doc/howtos/howtos.js
@@ -38,7 +38,7 @@ BOOMR.subscribe('before_beacon', function(o) {
r.innerHTML += "&nbsp;&nbsp;&nbsp;";
r.appendChild(t);
r.innerHTML += "<br>";
-
+
}
}
View
2  doc/index.html
@@ -27,7 +27,7 @@
</p>
<h2>what?</h2>
<p>
-boomerang is a piece of javascript that you add to your web pages, where it measures
+boomerang is a piece of javascript that you add to your web pages, where it measures
the performance of your website from your end user's point of view. It has the ability
to send this data back to your server for further analysis. With boomerang, you find
out exactly how fast your users think your site is.
View
2  doc/ja/howtos/dynamic-content.txt
@@ -18,4 +18,4 @@ Quisque dolor dui, tempus eu euismod at, condimentum eget felis. Pellentesque do
Quisque volutpat scelerisque ipsum, ac vulputate lorem dapibus quis. Donec et diam nulla. Nunc pellentesque viverra egestas. Etiam eget neque magna, a venenatis ante. Nulla facilisi. Ut quis nisl vel felis vestibulum consectetur sed id dolor. Sed ac metus eu turpis elementum porttitor. Proin euismod accumsan dui, at aliquet dui aliquam vitae. Proin vitae euismod erat. Etiam tincidunt est at libero mollis egestas. Nunc vitae lectus quis velit ullamcorper gravida vel in purus. Fusce feugiat odio vel lorem viverra lacinia. Curabitur adipiscing condimentum arcu sit amet tempor. Proin eget leo arcu, ac dictum justo. Curabitur viverra ultrices lorem, nec aliquet odio dictum vitae. Nam at volutpat velit. Sed sed rutrum magna. Cras ut felis a nunc euismod laoreet.
-Cras euismod rhoncus erat, et placerat sem pulvinar at. Sed tempus libero nec arcu luctus hendrerit. In tincidunt vehicula pretium. Mauris nec orci a magna aliquet faucibus sed quis ligula. Nulla id lacus id eros iaculis mollis vel non risus. Nam eget libero quam. Nullam sed magna purus, eu pretium sapien. Curabitur ullamcorper, tellus vitae sodales accumsan, arcu erat egestas augue, et adipiscing turpis diam ullamcorper nunc. Suspendisse dignissim scelerisque porttitor. Integer quis congue mauris. Mauris dignissim viverra tincidunt. Duis viverra malesuada nisl. Maecenas libero orci, porta eget mattis sit amet, mollis ut sapien. Aenean vulputate felis vitae sem aliquam vulputate eu sed est. Nunc sed enim nisi, ac cursus massa. Praesent quam ligula, tristique ut tincidunt dapibus, facilisis pulvinar turpis. Mauris ut eros tortor, at semper nulla. Integer facilisis scelerisque mauris, eu congue purus placerat in. Aenean augue augue, lacinia vitae dapibus non, posuere vitae neque.
+Cras euismod rhoncus erat, et placerat sem pulvinar at. Sed tempus libero nec arcu luctus hendrerit. In tincidunt vehicula pretium. Mauris nec orci a magna aliquet faucibus sed quis ligula. Nulla id lacus id eros iaculis mollis vel non risus. Nam eget libero quam. Nullam sed magna purus, eu pretium sapien. Curabitur ullamcorper, tellus vitae sodales accumsan, arcu erat egestas augue, et adipiscing turpis diam ullamcorper nunc. Suspendisse dignissim scelerisque porttitor. Integer quis congue mauris. Mauris dignissim viverra tincidunt. Duis viverra malesuada nisl. Maecenas libero orci, porta eget mattis sit amet, mollis ut sapien. Aenean vulputate felis vitae sem aliquam vulputate eu sed est. Nunc sed enim nisi, ac cursus massa. Praesent quam ligula, tristique ut tincidunt dapibus, facilisis pulvinar turpis. Mauris ut eros tortor, at semper nulla. Integer facilisis scelerisque mauris, eu congue purus placerat in. Aenean augue augue, lacinia vitae dapibus non, posuere vitae neque.
View
14 doc/ja/howtos/howto-2.html
@@ -36,15 +36,15 @@
<pre>
YUI().use("io-base", function(Y) {
var uri = "dynamic-content.txt";
-
+
function complete(id, o) {
var html = o.responseText;
document.getElementById("dynamic-content").innerHTML = html;
<em>BOOMR.plugins.RT.done(); // Tell boomerang to measure time and fire a beacon</em>
};
-
+
Y.on('io:complete', complete);
-
+
<em>BOOMR.plugins.RT.startTimer("t_done"); // Start measuring download time</em>
var request = Y.io(uri);
});
@@ -77,19 +77,19 @@
YUI().use("io-base", function(Y) {
var uri = "dynamic-content.txt?" + new Date().getTime();
-
+
function complete(id, o) {
var html = "<p>\n" + o.responseText.replace(/^$/mg, '</p>\n<p>') + "\n</p>";
document.getElementById("dynamic-content").innerHTML = html;
BOOMR.plugins.RT.done();
};
-
+
Y.on('io:complete', complete);
-
+
BOOMR.plugins.RT.startTimer("t_done");
var request = Y.io(uri);
});
-
+
</script>
</body>
</html>
View
4 doc/methodology.html
@@ -32,7 +32,7 @@
attach a function to the <code>window.onbeforeunload</code> event.
</p>
<p>
-Inside this function, we take a time reading (in milliseconds) and store it into a
+Inside this function, we take a time reading (in milliseconds) and store it into a
session cookie along with the URL of the current page.
</p>
</li>
@@ -54,7 +54,7 @@
is invalid, so we abort <a href="#fn-2" class="fn">[2]</a>.
</p>
<p>
-If we're still going, we pull the time out of the cookie and remove the cookie. We
+If we're still going, we pull the time out of the cookie and remove the cookie. We
measure the difference in the two times and this is the round trip time for the page.
</p>
</li>
View
2  doc/use-cases.html
@@ -110,7 +110,7 @@ <h2 id="uc-5">5. Measure HTTP latency</h2>
headers that don't contribute to actual page content.
</p>
<p>
-Measuring a user's HTTP latency provides a good indication of the impact that parallelising
+Measuring a user's HTTP latency provides a good indication of the impact that parallelising
component downloads can have on overall page load time.
</p>
<p>
View
2  ipv6.js
@@ -129,7 +129,7 @@ var impl = {
BOOMR.sendBeacon();
}
};
-
+
BOOMR.plugins.IPv6 = {
init: function(config) {
BOOMR.utils.pluginConfig(impl, config, "IPv6", ["ipv6_url", "host_url", "timeout"]);
View
2  navtiming.js
@@ -60,7 +60,7 @@ var impl = {
BOOMR.sendBeacon();
}
};
-
+
BOOMR.plugins.NavigationTiming = {
init: function() {
BOOMR.subscribe("page_ready", impl.done, null, impl);
View
2  plugin.js
@@ -23,7 +23,7 @@ BOOMR.plugins = BOOMR.plugins || {};
// This is optional, but the way we recommend you do it.
var impl = {
};
-
+
BOOMR.plugins.MyPlugin = {
init: function(config) {
var i, properties = ["prop1", "prop2"]; // list of user configurable properties in O
Please sign in to comment.
Something went wrong with that request. Please try again.