<commit_before>/**
 * Copyright 2011-2014 eBusiness Information, Groupe Excilys (www.ebusinessinformation.fr)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 		http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gatling.app

import java.lang.System.currentTimeMillis

import scala.Console.err
import scala.annotation.tailrec
import scala.io.StdIn
import scala.util.{ Success, Try }

import io.gatling.app.classloader.SimulationClassLoader
import io.gatling.app.cli.ArgsParser
import io.gatling.charts.report.{ ReportsGenerationInputs, ReportsGenerator }
import io.gatling.core.assertion.{ AssertionResult, AssertionValidator }
import io.gatling.core.config.GatlingFiles
import io.gatling.core.config.GatlingConfiguration
import io.gatling.core.config.GatlingConfiguration.configuration
import io.gatling.core.result.reader.DataReader
import io.gatling.core.runner.{ Runner, Selection }
import io.gatling.core.scenario.Simulation
import io.gatling.core.util.StringHelper
import io.gatling.core.util.StringHelper.RichString
import io.gatling.http.util.GA

/**
 * Object containing entry point of application
 */
object Gatling {

  def main(args: Array[String]): Unit = sys.exit(fromArgs(args, None))

  def fromMap(overrides: ConfigOverrides): StatusCode = new Gatling(overrides, None).start

  @deprecated(
    message = "Use fromArgs(mutable.Map[String, _], Option[Class[Simulation]]). Will be removed in 2.2.",
    since = "2.1")
  def runGatling(args: Array[String], simulationClass: SelectedSingleSimulation): StatusCode =
    fromArgs(args, simulationClass)

  def fromArgs(args: Array[String], simulationClass: SelectedSingleSimulation): StatusCode = {
    val argsParser = new ArgsParser(args)

    argsParser.parseArguments match {
      case Left(commandLineOverrides) =>
        new Gatling(commandLineOverrides, simulationClass).start
      case Right(statusCode) => statusCode
    }
  }
}
private[app] class Gatling(overrides: ConfigOverrides, simulationClass: SelectedSingleSimulation) {<commit_msg>Remove deprecated Gatling.runGatling(...) entry point<commit_after>/**
 * Copyright 2011-2014 eBusiness Information, Groupe Excilys (www.ebusinessinformation.fr)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 		http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.gatling.app

import java.lang.System.currentTimeMillis

import scala.Console.err
import scala.annotation.tailrec
import scala.io.StdIn
import scala.util.{ Success, Try }

import io.gatling.app.classloader.SimulationClassLoader
import io.gatling.app.cli.ArgsParser
import io.gatling.charts.report.{ ReportsGenerationInputs, ReportsGenerator }
import io.gatling.core.assertion.{ AssertionResult, AssertionValidator }
import io.gatling.core.config.GatlingFiles
import io.gatling.core.config.GatlingConfiguration
import io.gatling.core.config.GatlingConfiguration.configuration
import io.gatling.core.result.reader.DataReader
import io.gatling.core.runner.{ Runner, Selection }
import io.gatling.core.scenario.Simulation
import io.gatling.core.util.StringHelper
import io.gatling.core.util.StringHelper.RichString
import io.gatling.http.util.GA

/**
 * Object containing entry point of application
 */
object Gatling {

  def main(args: Array[String]): Unit = sys.exit(fromArgs(args, None))

  def fromMap(overrides: ConfigOverrides): StatusCode = new Gatling(overrides, None).start

  def fromArgs(args: Array[String], simulationClass: SelectedSingleSimulation): StatusCode = {
    val argsParser = new ArgsParser(args)

    argsParser.parseArguments match {
      case Left(commandLineOverrides) =>
        new Gatling(commandLineOverrides, simulationClass).start
      case Right(statusCode) => statusCode
    }
  }
}
private[app] class Gatling(overrides: ConfigOverrides, simulationClass: SelectedSingleSimulation) {
{'fraction_non_alphanumeric': 0.09281183932346723, 'fraction_numerical': 0.005919661733615222, 'mean_word_length': 4.965952080706179, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '252406', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1379, 'n_words': 382}