<commit_before>"""Some debugging functions for working with the Scrapy engine"""

from time import time # used in global tests code

from scrapy.project import crawler

def get_engine_status(engine=None):
    """Return a report of the current engine status"""
    if engine is None:
        engine = crawler.engine

    global_tests = [
        "time()-engine.start_time",
        "engine.has_capacity()",
        "engine.scheduler.is_idle()",
        "len(engine.scheduler.pending_requests)",
        "engine.downloader.is_idle()",
        "len(engine.downloader.slots)",
        "len(engine.downloader.active)",
        "engine.scraper.is_idle()",
        "len(engine.scraper.slots)",
    ]
    spider_tests = [
        "engine.spider_is_idle(spider)",
        "engine.slots[spider].closing",
        "len(engine.slots[spider].inprogress)",<commit_msg>removed no longer working tests from get_engine_status()<commit_after>"""Some debugging functions for working with the Scrapy engine"""

from time import time # used in global tests code

from scrapy.project import crawler

def get_engine_status(engine=None):
    """Return a report of the current engine status"""
    if engine is None:
        engine = crawler.engine

    global_tests = [
        "time()-engine.start_time",
        "engine.has_capacity()",
        "engine.downloader.is_idle()",
        "len(engine.downloader.slots)",
        "len(engine.downloader.active)",
        "engine.scraper.is_idle()",
        "len(engine.scraper.slots)",
    ]
    spider_tests = [
        "engine.spider_is_idle(spider)",
        "engine.slots[spider].closing",
        "len(engine.slots[spider].inprogress)",
{'fraction_non_alphanumeric': 0.12868310282621767, 'fraction_numerical': 0.0, 'mean_word_length': 3.108641975308642, 'pattern_counts': {'":': 0, '<': 3, '<?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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6777780', 'n_tokens_mistral': 511, 'n_tokens_neox': 510, 'n_words': 107}