<commit_before>package com.excilys.ebi.gatling.core.action

import com.excilys.ebi.gatling.core.context.Context
import com.excilys.ebi.gatling.core.result.message.ActionInfo

import java.util.concurrent.CountDownLatch
import java.util.Date

import akka.actor.Actor.registry.actorFor

class EndAction(val latch: CountDownLatch) extends Action {
  def execute(context: Context): Unit = {
    latch.countDown
    actorFor(context.getWriteActorUuid).map { a =>
      a ! ActionInfo(context.getScenarioName, context.getUserId, "End of scenario", new Date, 0, "OK", "End of Scenario Reached")
    }

    logger.info("Done user #{}", context.getUserId)

  }

  override def toString = "End Action"
}<commit_msg>Optimization<commit_after>package com.excilys.ebi.gatling.core.action

import com.excilys.ebi.gatling.core.context.Context
import com.excilys.ebi.gatling.core.result.message.ActionInfo

import java.util.concurrent.CountDownLatch
import java.util.Date

import akka.actor.Actor.registry.actorFor

class EndAction(val latch: CountDownLatch) extends Action {
  def execute(context: Context): Unit = {
    actorFor(context.getWriteActorUuid).map { a =>
      a ! ActionInfo(context.getScenarioName, context.getUserId, "End of scenario", new Date, 0, "OK", "End of Scenario Reached")
    }

    latch.countDown

    logger.info("Done user #{}", context.getUserId)
  }

  override def toString = "End Action"
}
{'fraction_non_alphanumeric': 0.11513859275053305, 'fraction_numerical': 0.0014214641080312722, 'mean_word_length': 4.565217391304348, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4047874', 'n_tokens_mistral': 473, 'n_tokens_neox': 466, 'n_words': 94}