<commit_before>package io.reactors
package debugger



import io.reactors.common.UnrolledRing
import org.json4s._
import org.json4s.JsonDSL._
import scala.collection._



class DeltaDebugger(val system: ReactorSystem, val sessionuid: String)
extends DebugApi {
  private val monitor = system.monitor
  private val windowSize = 128
  private val oldstate = new DeltaDebugger.State()
  private var oldtimestamp = 0L
  private var curstate: DeltaDebugger.State = null
  private var curtimestamp = 0L
  private val deltas = new UnrolledRing[DeltaDebugger.Delta]

  {
    monitor.synchronized {
      for ((id, name, _) <- system.frames.values) {
        oldstate.reactors(id) = name
      }
    }
    curstate = oldstate.copy()
  }

  private def enqueue(delta: DeltaDebugger.Delta) {
    monitor.synchronized {
      deltas.enqueue(delta)
      delta.apply(curstate)<commit_msg>Increase window size in delta debugger<commit_after>package io.reactors
package debugger



import io.reactors.common.UnrolledRing
import org.json4s._
import org.json4s.JsonDSL._
import scala.collection._



class DeltaDebugger(val system: ReactorSystem, val sessionuid: String)
extends DebugApi {
  private val monitor = system.monitor
  private val windowSize = 512
  private val oldstate = new DeltaDebugger.State()
  private var oldtimestamp = 0L
  private var curstate: DeltaDebugger.State = null
  private var curtimestamp = 0L
  private val deltas = new UnrolledRing[DeltaDebugger.Delta]

  {
    monitor.synchronized {
      for ((id, name, _) <- system.frames.values) {
        oldstate.reactors(id) = name
      }
    }
    curstate = oldstate.copy()
  }

  private def enqueue(delta: DeltaDebugger.Delta) {
    monitor.synchronized {
      deltas.enqueue(delta)
      delta.apply(curstate)
{'fraction_non_alphanumeric': 0.08338028169014085, 'fraction_numerical': 0.007887323943661971, 'mean_word_length': 3.649214659685864, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5327365', 'n_tokens_mistral': 565, 'n_tokens_neox': 544, 'n_words': 140}