title: What is the best macro-benchmarking tool / framework to measure a single-threaded complex algorithm in Java?
body: <p>I want to make some performance measures (mainly runtime) for my Java code, a single-threaded, local, complex algorithm. (So I do not want a macro-benchmark to measure a JVM implementation.)</p>
  
  <p>With the tool, I would like to</p>
  
  <ul>
  <li><strong>analyse the complexity</strong>, i.e. see how my code scales for a parameter n (the search depth). (I already have a junit test parameterized in n.)</li>
  <li>do some <strong>trend analysis</strong> to get warned if some change to the code base makes the code slower.</li>
  </ul>
  
  <p>For this, I would like to use a tool or framework that </p>
  
  <ul>
  <li>does the <strong>statistics</strong>, optimally computing the mean value, standard deviation and confidence intervals. This is very important.</li>
  <li>can be <strong>parameterized</strong> (see parameter n above). This is also very important.</li>
  <li>is able to produce a fancy plot would be nice, but is not required</li>
  <li>can be used in an automated (junit-)test to warn me if my program slows done, but this is also not required, just a plus.</li>
  </ul>
  
  <p>What tools/frameworks fulfill these requirements? Which one would be well suited for complexity and trend analysis, and why?</p>