Open GoogleCodeExporter opened 9 years ago
better yet, add new main(class, String ... args )
Original comment by Andrei.Pozolotin
on 10 Jan 2013 at 5:09
I'm not sure that we want to encourage this type of manual invocation. We've
seen a lot of issues in Google with people that have been doing strange things
in their main methods that make their benchmarks complex and difficult to
maintain.
Do you have a particular use case for this?
Original comment by gak@google.com
on 10 Jan 2013 at 6:13
I agree with NOT "we want to encourage this type of manual invocation"
my use case: quick/dirty runs testing to save typing
well, provide it, but mark it @Deprecated and explain why
Original comment by Andrei.Pozolotin
on 10 Jan 2013 at 6:17
Introducing a @Deprecated method to save someone from initializing their own
array leaves me skeptical. Still not ruling it out, but not overwhelmed by the
idea either…
Original comment by gak@google.com
on 10 Jan 2013 at 6:44
thank you for considering this.
how about introducing new annotation:
@YouWillBeFiredFromGoogleIfYouUseThis
:-)
Original comment by Andrei.Pozolotin
on 10 Jan 2013 at 6:57
The hazard is that varargs allows you to pass nothing, and then people very
easily forget to pass 'args' through. As they're busily editing their
benchmark, they keep updating their @Param defaults and such, and sometimes
never notice that args don't work until later. Their benchmark is checked in
and people are passing arguments, even --help, and it doesn't work...
I'd like more detail about how it helps your "quick/dirty runs testing."
Original comment by kevinb@google.com
on 11 Jan 2013 at 4:21
instead of
main(BenchClass.class, "--verbose")
I have to say
main(BenchClass.class, new Sring[]{"--verbose"})
needless clutter.
Original comment by Andrei.Pozolotin
on 17 Jan 2013 at 11:39
I get that part, but not why hardcoding command-line arguments in Java form is
a useful practice. It would matter less if there were no downside to changing
to varargs, but there is.
Original comment by kevinb@google.com
on 18 Jan 2013 at 3:08
Original issue reported on code.google.com by
Andrei.Pozolotin
on 10 Jan 2013 at 5:08