<commit_before>/**
 *   ____    __    ____  ____  ____,,___     ____  __  __  ____
 *  (  _ \  /__\  (_   )(_  _)( ___)/ __)   (  _ \(  )(  )(  _ \           Read
 *   )   / /(__)\  / /_  _)(_  )__) \__ \    )___/ )(__)(  ) _ <     README.txt
 *  (_)\_)(__)(__)(____)(____)(____)(___/   (__)  (______)(____/    LICENSE.txt
 */
package razie.wiki.admin

import org.joda.time.DateTime

/** current ops data is updated here from all over - you can inspect this in a page
  *
  * not nice, poor man's JMX
  */
object GlobalData {
  //todo use proper JMX istead

  // how many requests were served
  var served = 0L
  var servedPages = 0L

  /** how many wiki options have been requested - simple stats */
  var wikiOptions = 0L

  // how many threads are currently serving - if 0, there's none...
  var serving = 0

  val startedDtm = DateTime.now

  var clusterStatus : String = "-"
}
<commit_msg>siple rate limiting api<commit_after>/**
 *   ____    __    ____  ____  ____,,___     ____  __  __  ____
 *  (  _ \  /__\  (_   )(_  _)( ___)/ __)   (  _ \(  )(  )(  _ \           Read
 *   )   / /(__)\  / /_  _)(_  )__) \__ \    )___/ )(__)(  ) _ <     README.txt
 *  (_)\_)(__)(__)(____)(____)(____)(___/   (__)  (______)(____/    LICENSE.txt
 */
package razie.wiki.admin

import org.joda.time.DateTime

/** current ops data is updated here from all over - you can inspect this in a page
  *
  * not nice, poor man's JMX
  */
object GlobalData {
  //todo use proper JMX istead

  // how many requests were served
  @volatile var served = 0L
  @volatile var servedRequests = 0L
  @volatile var maxServing = 0 // how many threads are currently serving - if 0, there's none...
  @volatile var maxServingApiRequests = 0 // how many threads are currently serving - if 0, there's none...
  @volatile var serving = 0 // how many threads are currently serving - if 0, there's none...
  @volatile var servingApiRequests = 0 // how many threads are currently serving - if 0, there's none...
  @volatile var servedApiRequests = 0L
  @volatile var limitedApiRequests = 0L // how many were kicked off under load

  /** how many wiki options have been requested - simple stats */
  var wikiOptions = 0L

  val startedDtm = DateTime.now

  var clusterStatus : String = "-"
}

{'fraction_non_alphanumeric': 0.12898936170212766, 'fraction_numerical': 0.007978723404255319, 'mean_word_length': 2.3045387994143485, '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': '6076259', 'n_tokens_mistral': 790, 'n_tokens_neox': 732, 'n_words': 219}