Skip to content

Instantly share code, notes, and snippets.

@zaynelt
Last active December 21, 2020 20:49
Show Gist options
  • Save zaynelt/27c11d09a1387c1603e3ee9e5984831c to your computer and use it in GitHub Desktop.
Save zaynelt/27c11d09a1387c1603e3ee9e5984831c to your computer and use it in GitHub Desktop.
Code snippets to mock and performance test virtual desktop session connections to Salesforce
const pageEpt = await remote.execute(() => {
let ept = null;
let error = null;
try {
const t = $A.metricsService.getCurrentPageTransaction();
ept = t.config.context.ept;
} catch (e) {
error = e.message || e;
}
if (!Number.isInteger(ept)) {
error = "EPT not an number";
}
return { ept, URL: `${location.pathname}${location.search}`, error };
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment