Skip to content
This repository has been 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 salesforce? #49

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

vijaykumarvemula
Copy link

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 stor eatleast one value, example page loading time.

ninodafonte and others added 4 commits August 6, 2011 15:09
… formatResponse inside plugins.

This open the posibilities for modifying the output format and adapt it to the required response.

Signed-off-by: Nino Dafonte <[email protected]>
@bluesmoon
Copy link
Contributor

Please make your changes against the main repository at https://github.com/lognormal/boomerang

This repository is obsolete.

1 similar comment
@bluesmoon
Copy link
Contributor

Please make your changes against the main repository at https://github.com/lognormal/boomerang

This repository is obsolete.

bluesmoon pushed a commit to bluesmoon/boomerang that referenced this pull request Mar 8, 2017
Added ESLint rules: brace-style and space-after-keywords

Reviewed By: @cvazac, @andreas-marschke
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.

4 participants