<commit_before>package benchmarks

import org.openjdk.jmh.annotations.{Param, Scope, State}
import rescala.Engines
import rescala.engine.Engine
import rescala.parrp.Backoff
import rescala.propagation.Turn

@State(Scope.Benchmark)
class EngineParam[S <: rescala.graph.Struct] {
  @Param(Array("synchron", "parrp", "locksweep", "stm"))
  var engineName: String = _

  @Param(Array("100000"))
  var minBackoff: Long = _
  @Param(Array("10000000"))
  var maxBackoff: Long = _
  @Param(Array("1.2"))
  var factorBackoff: Double = _

  def engine: Engine[S, Turn[S]] = engineName match {
    case "parrp" => Engines.parrpWithBackoff(() => new Backoff(minBackoff, maxBackoff, factorBackoff)).asInstanceOf[Engine[S, Turn[S]]]
    case "locksweep" => Engines.locksweepWithBackoff(() => new Backoff(minBackoff, maxBackoff, factorBackoff)).asInstanceOf[Engine[S, Turn[S]]]
    case "stm" => rescala.stm.STMEngine.stm.asInstanceOf[Engine[S, Turn[S]]]
    case "restoring" => new rescala.restore.ReStoringEngine().asInstanceOf[Engine[S, Turn[S]]]
    case other => Engines.byName[S](other)
  }
}<commit_msg>make Backoff no longer a benchmark parameter<commit_after>package benchmarks

import org.openjdk.jmh.annotations.{Param, Scope, State}
import rescala.Engines
import rescala.engine.Engine
import rescala.propagation.Turn

@State(Scope.Benchmark)
class EngineParam[S <: rescala.graph.Struct] {
  @Param(Array("synchron", "parrp", "locksweep", "stm"))
  var engineName: String = _

  def engine: Engine[S, Turn[S]] = engineName match {
    case "stm" => rescala.stm.STMEngine.stm.asInstanceOf[Engine[S, Turn[S]]]
    case "restoring" => new rescala.restore.ReStoringEngine().asInstanceOf[Engine[S, Turn[S]]]
    case other => Engines.byName[S](other)
  }
}
{'fraction_non_alphanumeric': 0.15005727376861397, 'fraction_numerical': 0.009163802978235968, 'mean_word_length': 5.642585551330798, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4627659', 'n_tokens_mistral': 650, 'n_tokens_neox': 612, 'n_words': 118}