question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

--multi recording network (maybe even more..?) calls prior to measure.start

See original GitHub issue

I’ve noticed that in the waterfall of my --multi script results, there are lines before the URL that is being measured in measure.start.

That could also mean that maybe other things are being recorded and maybe even the results take into account the steps before measure.start, which of course means wrong results.

Here is a waterfall example with the URL being measured highlighted: screen shot 2019-01-21 at 19 31 50

And here is my script:

module.exports = async function(context, commands) {
  const login = 'https://hello.com';
  let redirectURL;
  let loadTimeout;

  // If we would like to test in no cache mode or not
  if (context.options.my.nocache) {
    redirectURL = login;
    loadTimeout = 1000;
    context.log.warn('Cache simulation: cache disabled - simulating first comer');
  } else {
    redirectURL = context.options.my.url;
    // We're doing a long timeout so the page will have chance to load all
    // the required items to simulate a page refresh
    loadTimeout = 6000;
    context.log.warn('Cache simulation: cache enabled - simulating page refresh');
  }

  let loginURL = `${login}/session?redirect=${encodeURIComponent(redirectURL)}`;

  // Navigate to login page
  await commands.navigate(loginURL);

  // Login
  await commands.click.byId('sign_in');
  await commands.wait.byId('loginframe', 2000);
  await commands.switch.toFrame('loginframe');

  await commands.addText.byId(context.options.my.userName, 'userName');
  await commands.click.byId('verify_user_btn');
  await commands.wait.byTime(1000);

  await commands.wait.byId('password', 5000);
  await commands.addText.byId(context.options.my.password, 'password');
  await commands.click.byId('btnSubmit');

  // Wait for login to be done depending on the need to reuse cache or not
  context.log.info('Done login step, waiting for redirect to finish');
  await commands.wait.byTime(loadTimeout);

  // Start the measuring of the performance of the tested URL
  return commands.measure.start(context.options.my.url);
};

More info

Version: 8.0.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:44 (24 by maintainers)

github_iconTop GitHub Comments

1reaction
soulgalorecommented, Jan 23, 2019

I’ve updated Visual Metrics but I need to do some more testing before I release it. Thanks for sharing the video @kazazor without it I couldn’t have understood the problem 😃

1reaction
soulgalorecommented, Jan 23, 2019

Actually it seems to be a bug in our version of Visual Metric could be that I’ve missed to upgrade to latest version, I’ll have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This Call May Be Monitored Or Recorded – Legal Or Not?
Notice and consent are, generally, a bit more straightforward. Notice consists of that recording you hear when you call into a contact center...
Read more >
Prepare your organization's network for Microsoft Teams
Do you have a verified domain for Microsoft 365 or Office 365 (for ... Teams runs slowly (maybe you have insufficient bandwidth); Calls...
Read more >
Network features reference - Chrome Developers
Discover new ways to analyze how your page loads in this comprehensive reference of Chrome DevTools network analysis features.
Read more >
Issue with call recording - OnePlus Community
When I press the record button during the call, it works. After the call end and I check my recording, it is a...
Read more >
Know Your Rights: Phone Call Recording Laws by State - Rev
There are many reasons you may want to record a call. Journalists find it to be a more accurate way to interview sources,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found