Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a defined format for writing profiles #16

Open
f-masche opened this issue Feb 16, 2017 · 0 comments
Open

Create a defined format for writing profiles #16

f-masche opened this issue Feb 16, 2017 · 0 comments
Labels

Comments

@f-masche
Copy link
Collaborator

f-masche commented Feb 16, 2017

Inspiration: Mocha

profile('+ vs *', () => {
  let randomNumbers;
  const sum = ([a, b]) => a + b;
  const mult = ([a, b]) => a * b;

  profile('with numbers', () => {
    prepare(() => {
      randomNumbers[0] = Math.random();
      randomNumbers[1] = Math.random();
    });

    execute('sum', sum);
    execute('multiply', mult);
  });

  profile('with strings', () => {
    prepare(() => {
      randomNumbers[0] = Math.random().toString();
      randomNumbers[1] = Math.random().toString();
    });

    execute('sum', sum);
    execute('multiply', mult);
  });

  /* With test data
  prepare(() => getTestData());

  execute('sum', (testData) => {
    const sum = testData[0] + testData[1];
  });
  */
});
@f-masche f-masche changed the title Create a well defined API for writing profiles Create a well defined format for writing profiles Feb 16, 2017
@f-masche f-masche changed the title Create a well defined format for writing profiles Create a defined format for writing profiles Feb 16, 2017
@haensl haensl added the feature label Feb 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants