<commit_before>"""
DB Benchmarking Application
===========================

Main.py

This file houses the core of the application, and is where all of the
read/write commands are issued from, timed, and all data is analyzed.  Results
from the trials are printed to the console by default, and are also printed to
a markdown file to keep a record of.  This is particularly helpful when
benchmarking multiple DB's in a row to see which one is fastest for deployment
purposes.

    Usage:
        main.py <database> [options]
        main.py --debug [options]
        main.py <database> <report_title> [options]

    Options:
        -h --help           Show this help screen
        -v                  Show verbose output from the application
        -V                  Show REALLY verbose output, including the time
                                from each run
        -s                  Sleep mode (experimental) - sleeps for 1/20 (s)
                                between each read and write
        -c --chaos          Activates CHAOS mode, where reads are taken
                                randomly from the DB instead of sequentially
        -l --list           Outputs a list of available DB modules
        --csv               Records unaltered read and write data to a CSV file
                                for your own analysis
        --no-report         Option to disable the creation of the report file
        --no-split          Alternate between reads and writes instead of all
                                writes before reads
        --debug             Generates a random dataset instead of actually
                                connecting to a DB
        --length=<n>        Specify an entry length for reads/writes
                                [default: 10]
        --trials=<n>        Specify the number of reads and writes to make to
                                the DB to collect data on [default: 1000]
"""
import ipdb

# TODO [x] - add a progress bar for non-verbose output
# TODO [x] - add some better data analysis
# TODO [ ] - add python 3.x support
# TODO [ ] - remove outlier table from report and add system parameter table

from os import getcwd, listdir, makedirs
from sys import exit
import time
import string
import random
import importlib
import pandas as pd
import numpy as np
import pylab

from tabulate import tabulate

from docopt import docopt
from clint.textui import progress

# Although it appears as if this import is unused, it's used for formatting
# pandas graphs.
import seaborn


def retrieve_module_list():
    """ This function will retrieve a list of all available modules in the
    project directory and then return said list.

    :return mod_list: The list of modules in the project directory

    """
    current_dir = getcwd()
    mod_list = []<commit_msg>moved some imports around, but no major changes<commit_after>"""
DB Benchmarking Application
===========================

Main.py

This file houses the core of the application, and is where all of the
read/write commands are issued from, timed, and all data is analyzed.  Results
from the trials are printed to the console by default, and are also printed to
a markdown file to keep a record of.  This is particularly helpful when
benchmarking multiple DB's in a row to see which one is fastest for deployment
purposes.

    Usage:
        main.py <database> [options]
        main.py --debug [options]
        main.py <database> <report_title> [options]

    Options:
        -h --help           Show this help screen
        -v                  Show verbose output from the application
        -V                  Show REALLY verbose output, including the time
                                from each run
        -s                  Sleep mode (experimental) - sleeps for 1/20 (s)
                                between each read and write
        -c --chaos          Activates CHAOS mode, where reads are taken
                                randomly from the DB instead of sequentially
        -l --list           Outputs a list of available DB modules
        --csv               Records unaltered read and write data to a CSV file
                                for your own analysis
        --no-report         Option to disable the creation of the report file
        --no-split          Alternate between reads and writes instead of all
                                writes before reads
        --debug             Generates a random dataset instead of actually
                                connecting to a DB
        --length=<n>        Specify an entry length for reads/writes
                                [default: 10]
        --trials=<n>        Specify the number of reads and writes to make to
                                the DB to collect data on [default: 1000]
"""

# TODO [x] - add a progress bar for non-verbose output
# TODO [x] - add some better data analysis
# TODO [ ] - add python 3.x support
# TODO [ ] - remove outlier table from report and add system parameter table

import time
import string
import random
import importlib
import pylab
import ipdb
import seaborn
import pandas as pd
import numpy as np

from os import getcwd, listdir, makedirs
from sys import exit
from tabulate import tabulate
from docopt import docopt
from clint.textui import progress


def retrieve_module_list():
    """ This function will retrieve a list of all available modules in the
    project directory and then return said list.

    :return mod_list: The list of modules in the project directory

    """
    current_dir = getcwd()
    mod_list = []
{'fraction_non_alphanumeric': 0.05485307212822796, 'fraction_numerical': 0.003561887800534283, 'mean_word_length': 1.8859198355601234, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4967559', 'n_tokens_mistral': 1371, 'n_tokens_neox': 1291, 'n_words': 692}