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

[feat] bench.todo() #35

Closed
loynoir opened this issue Apr 8, 2023 · 5 comments
Closed

[feat] bench.todo() #35

loynoir opened this issue Apr 8, 2023 · 5 comments

Comments

@loynoir
Copy link

loynoir commented Apr 8, 2023

Before

if(!foobar_has_test_bug) bench.add(foobar.name, foobar)
  • Table of hello, world, foobar
  • Or table of hello, world

Which might let dev forget to watch upstream bug.

After

if(foobar_has_test_bug) {
  bench.todo(foobar.name, foobar)
} else {
  bench.add(foobar.name, foobar)
}
  • Table of hello, world, foobar, while foobar maybe N/A

Related

isomorphic-git/isomorphic-git#1163 (comment)

@loynoir loynoir changed the title [feat] bench.skip() [feat] bench.todo() Apr 8, 2023
@Aslemammad
Copy link
Member

Nice additions, are you interested in adding them yourself?

@kamiloox
Copy link
Contributor

kamiloox commented Apr 23, 2023

Hey, I can try to create a PR for that. But one question - how the API could look like? Because if we want to be consistent between different versions it might not be the best thing to set a result with values of N/A. Marking them as number | 'N/A' will be a major change. My idea is to make a todo: boolean = false flag in Task. Example:

image
image

WDYT guys about this API? It's not the best but it's one of the possible solution 😄

@Aslemammad
Copy link
Member

@kamiloox I don't think any calculation is going to be there, and we just make it todo and the rest is handled by the user, no need to worry about that.

@kamiloox
Copy link
Contributor

kamiloox commented Apr 23, 2023

@Aslemammad In the README there is an example of how to use this library. The results are multiplied by 1000. If it is okay to leave it up to user decision then fine

image

So if the bench case is marked as todo I can make the result field as undefined 👌

@Aslemammad
Copy link
Member

As I say, It's ok to leave it to the users. And if we do not do anything with the todo, that way the user won't even see it, so this is even better. this way it won't even be in bench.tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants