<commit_before>package flixel.system.debug.stats;

import flash.display.BitmapData;
import flash.system.System;
import flash.text.TextField;
import flixel.FlxG;
import flixel.math.FlxMath;
import flixel.system.FlxLinkedList;
import flixel.system.FlxQuadTree;
import flixel.system.debug.DebuggerUtil;
import flixel.system.debug.FlxDebugger.GraphicStats;
import flixel.system.ui.FlxSystemButton;
import flixel.util.FlxColor;

@:bitmap("assets/images/debugger/buttons/minimize.png")
private class GraphicMinimizeButton extends BitmapData {}

@:bitmap("assets/images/debugger/buttons/maximize.png")
private class GraphicMaximizeButton extends BitmapData {}

/**
 * A simple performance monitor widget, for use in the debugger overlay.
 *
 * @author Adam "Atomic" Saltsman
 * @author <NAME>
 */
#if FLX_DEBUG
class Stats extends Window
{
	/**
	 * How often to update the stats, in ms. The lower, the more performance-intense!
	 */
	static inline var UPDATE_DELAY:Int = 250;

	/**
	 * The initial width of the stats window.
	 */
	static inline var INITIAL_WIDTH:Int = 160;

	/**
	 * The minimal height of the window.
	 */
	static var minHeight:Int = 0;

	static inline var FPS_COLOR:FlxColor = 0xff96ff00;
	static inline var MEMORY_COLOR:FlxColor = 0xff009cff;
	static inline var DRAW_TIME_COLOR:FlxColor = 0xffA60004;
	static inline var UPDATE_TIME_COLOR:FlxColor = 0xffdcd400;

	public static inline var LABEL_COLOR:FlxColor = 0xaaffffff;
	public static inline var TEXT_SIZE:Int = 11;
	public static inline var DECIMALS:Int = 1;

	var _leftTextField:TextField;
	var _rightTextField:TextField;

	var _itvTime:Int = 0;
	var _frameCount:Int;
	var _currentTime:Int;

	var fpsGraph:StatsGraph;
	var memoryGraph:StatsGraph;
	var drawTimeGraph:StatsGraph;
	var updateTimeGraph:StatsGraph;

	var flashPlayerFramerate:Float = 0;
	var visibleCount:Int = 0;
	var activeCount:Int = 0;
	var updateTime:Int = 0;
	var drawTime:Int = 0;
	var drawCallsCount:Int = 0;

	var _lastTime:Int = 0;
	var _updateTimer:Int = 0;

	var _update:Array<Int> = [];
	var _updateMarker:Int = 0;

	var _draw:Array<Int> = [];
	var _drawMarker:Int = 0;

	var _drawCalls:Array<Int> = [];
	var _drawCallsMarker:Int = 0;

	var _visibleObject:Array<Int> = [];
	var _visibleObjectMarker:Int = 0;

	var _activeObject:Array<Int> = [];
	var _activeObjectMarker:Int = 0;

	var _paused:Bool = true;

	var _toggleSizeButton:FlxSystemButton;

	/**
	 * Creates a new window with fps and memory graphs, as well as other useful stats for debugging.
	 */
	public function new()
	{
		super("Stats", new GraphicStats(0, 0), 0, 0, false);

		if (minHeight == 0)
		{
			if (FlxG.renderTile)
				minHeight = 200;
			else
				minHeight = 185;
		}
<commit_msg>Why on earth was this even a static var<commit_after>package flixel.system.debug.stats;

import flash.display.BitmapData;
import flash.system.System;
import flash.text.TextField;
import flixel.FlxG;
import flixel.math.FlxMath;
import flixel.system.FlxLinkedList;
import flixel.system.FlxQuadTree;
import flixel.system.debug.DebuggerUtil;
import flixel.system.debug.FlxDebugger.GraphicStats;
import flixel.system.ui.FlxSystemButton;
import flixel.util.FlxColor;

@:bitmap("assets/images/debugger/buttons/minimize.png")
private class GraphicMinimizeButton extends BitmapData {}

@:bitmap("assets/images/debugger/buttons/maximize.png")
private class GraphicMaximizeButton extends BitmapData {}

/**
 * A simple performance monitor widget, for use in the debugger overlay.
 *
 * @author Adam "Atomic" Saltsman
 * @author <NAME>
 */
#if FLX_DEBUG
class Stats extends Window
{
	/**
	 * How often to update the stats, in ms. The lower, the more performance-intense!
	 */
	static inline var UPDATE_DELAY:Int = 250;

	/**
	 * The initial width of the stats window.
	 */
	static inline var INITIAL_WIDTH:Int = 160;

	static inline var FPS_COLOR:FlxColor = 0xff96ff00;
	static inline var MEMORY_COLOR:FlxColor = 0xff009cff;
	static inline var DRAW_TIME_COLOR:FlxColor = 0xffA60004;
	static inline var UPDATE_TIME_COLOR:FlxColor = 0xffdcd400;

	public static inline var LABEL_COLOR:FlxColor = 0xaaffffff;
	public static inline var TEXT_SIZE:Int = 11;
	public static inline var DECIMALS:Int = 1;

	var _leftTextField:TextField;
	var _rightTextField:TextField;

	var _itvTime:Int = 0;
	var _frameCount:Int;
	var _currentTime:Int;

	var fpsGraph:StatsGraph;
	var memoryGraph:StatsGraph;
	var drawTimeGraph:StatsGraph;
	var updateTimeGraph:StatsGraph;

	var flashPlayerFramerate:Float = 0;
	var visibleCount:Int = 0;
	var activeCount:Int = 0;
	var updateTime:Int = 0;
	var drawTime:Int = 0;
	var drawCallsCount:Int = 0;

	var _lastTime:Int = 0;
	var _updateTimer:Int = 0;

	var _update:Array<Int> = [];
	var _updateMarker:Int = 0;

	var _draw:Array<Int> = [];
	var _drawMarker:Int = 0;

	var _drawCalls:Array<Int> = [];
	var _drawCallsMarker:Int = 0;

	var _visibleObject:Array<Int> = [];
	var _visibleObjectMarker:Int = 0;

	var _activeObject:Array<Int> = [];
	var _activeObjectMarker:Int = 0;

	var _paused:Bool = true;

	var _toggleSizeButton:FlxSystemButton;

	/**
	 * Creates a new window with fps and memory graphs, as well as other useful stats for debugging.
	 */
	public function new()
	{
		super("Stats", new GraphicStats(0, 0), 0, 0, false);

		var minHeight = if (FlxG.renderTile) 200 else 185;
{'fraction_non_alphanumeric': 0.10139992432841469, 'fraction_numerical': 0.02043132803632236, 'mean_word_length': 4.829106945975744, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '3932874', 'n_tokens_mistral': 1980, 'n_tokens_neox': 1792, 'n_words': 489}