Skip to content
This repository was archived by the owner on Apr 15, 2019. It is now read-only.

How to retrieve the results from js and how store those values in sobject?#50

Open
vijaykumarvemula wants to merge 2060 commits intoYahooArchive:masterfrom
bluesmoon:master
Open

How to retrieve the results from js and how store those values in sobject?#50
vijaykumarvemula wants to merge 2060 commits intoYahooArchive:masterfrom
bluesmoon:master

Conversation

@vijaykumarvemula
Copy link
Copy Markdown

I wrote the small javascript code in visualforce page by using boomerang tool. It shows the result in same page. I want to store the result in sobject. can any one tell me how to store the data? here i am giving my sample code.

<apex:page >

<title>Boomerang Exp</title> <script src="/resource/1427268234000/boomeranexp"></script> <script type="text/javascript"> BOOMR.init({ beacon_url: "https://sfdc.com/resource/1427275857000/beaconresult", site_domain: "https://sfdc.com", user_ip: "203.129.222.211", }); BOOMR.subscribe('before_beacon', function (o) { var html = "", t_name, t_other, others = []; if (!o.t_other) o.t_other = ""; for (var k in o) { if (!k.match(/^(t_done|t_other|bw|lat|bw_err|lat_err|u|r2?)$/)) { if (k.match(/^t_/)) { o.t_other += "," + k + "|" + o[k]; } else { others.push(k + " = " + o[k]); } } } if (o.t_done) { html += "This page took " + o.t_done + " ms to load
"; } if (o.t_other) { t_other = o.t_other.replace(/^,/, '').replace(/\|/g, ' = ').split(','); html += "Other timers measured:
"; for (var i = 0; i < t_other.length; i++) { html += "   " + t_other[i] + " ms
"; } } if (o.bw) { html += "Your bandwidth to this server is " + parseInt(o.bw * 8 / 1024) + "kbps (±" + parseInt(o.bw_err * 100 / o.bw) + "%)
"; } if (o.lat) { html += "Your latency to this server is " + parseInt(o.lat) + "±" + o.lat_err + "ms
"; } var r = document.getElementById('results'); r.innerHTML = html; if (others.length) { r.innerHTML += "Other parameters:
"; for (var i = 0; i < others.length; i++) { var t = document.createTextNode(others[i]); r.innerHTML += "   "; r.appendChild(t); r.innerHTML += "
"; } } }); </script>

Boomerang Example:

/apex:page

my result is

This page took 21 ms to load
Other timers measured:
boomerang = 2 ms
boomr_fb = 16 ms
t_resp = 0 ms
t_page = 21 ms
Your latency to this server is 1±0.32ms
Other parameters:
rt.start = navigation
rt.bstart = 1427280303553
rt.end = 1427280303558
bw_time = 1427280304

I want to store at-least one value, example page loading time.

bluesmoon added a commit to bluesmoon/boomerang that referenced this pull request Apr 2, 2015
Optional parameter to await completion in bandwidth plugin before sending beacon
Conflicts:
	doc/api/BW.html
bluesmoon added a commit to bluesmoon/boomerang that referenced this pull request Mar 21, 2016
Optional parameter to await completion in bandwidth plugin before sending beacon
bluesmoon pushed a commit to bluesmoon/boomerang that referenced this pull request Mar 8, 2017
nicjansma and others added 30 commits November 11, 2025 08:51
…ode on the page cannot change it

Additionally, if someone overwrote BOOMR.version and it is no longer the same as impl.version, capture that
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.