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

Empty HTML Report #157

Open
anthonylau opened this issue Jan 17, 2016 · 5 comments
Open

Empty HTML Report #157

anthonylau opened this issue Jan 17, 2016 · 5 comments

Comments

@anthonylau
Copy link

Not sure what was wrong. Would anyone advise?

object TestBenchmark extends Bench.LocalTime {
   val sizes = Gen.range("size")(100, 1000, 500)

  val ranges = for {
    size <- sizes
  } yield 0 until size

  override def warmer = Warmer.Zero

  override def reporter = new HtmlReporter()

  performance of "Range" in {
    measure method "map" in {
      using(ranges) in {
        r => r.map(_ + 1)
      }
    }
  }
}

screen shot 2016-01-17 at 10 13 18 pm

@axel22
Copy link
Member

axel22 commented Jan 17, 2016

Hi,

You should be using a an OfflineReport benchmark template, which generates an HTML report and does not report performance regressions (explanations of benchmark templates are in the docs). LocalTime should only measure the time and not produce any output.

You can see all the different benchmark templates here:

https://github.com/scalameter/scalameter/blob/master/src/main/scala/org/scalameter/Bench.scala

In case you need something more custom, then in the source code, you can also see how to set a custom measurer, warmer, reporter, etc. from how the benchmark templates are defined.

If you need already completed working examples, there is an examples directory at GitHub:

https://github.com/scalameter/scalameter-examples

This is an example of OfflineRegressionReport.

https://github.com/scalameter/scalameter-examples/blob/master/offline-regression-report/src/bench/scala/org/scalameter/examples/ListBenchmark.scala

@axel22 axel22 closed this as completed Jan 17, 2016
@anthonylau
Copy link
Author

Thanks a lot! But I come into this issue

[error] Could not run test TestBenchmark: java.lang.VerifyError: class com.fasterxml.jackson.module.scala.ser.ScalaIteratorSerializer overrides final method withResolved.(Lcom/fasterxml/jackson/databind/BeanProperty;Lcom/fasterxml/jackson/databind/jsontype/TypeSerializer;Lcom/fasterxml/jackson/databind/JsonSerializer;)Lcom/fasterxml/jackson/databind/ser/std/AsArraySerializerBase;

I have searched around, seems there is a conflict between fasterxml and jackson.

@anthonylau
Copy link
Author

Fixed by excluding exclude("com.fasterxml.jackson.core", "jackson-databind")

@axel22
Copy link
Member

axel22 commented Jan 18, 2016

Thanks for reporting. This conflict is something we will need to fix for the next version.

@axel22 axel22 reopened this Jan 18, 2016
@michaelahlers
Copy link

@axel22, thanks for the tip! I stumbled over the same problem with empty HTML reports.

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