# Path: afl_utils/afl_stats.py
# def show_info():
# def read_config(config_file):
# def twitter_init(config):
# def shorten_tweet(tweet):
# def fuzzer_alive(pid):
# def parse_stat_file(stat_file, summary=True):
# def load_stats(fuzzer_dir, summary=True):
# def summarize_stats(stats):
# def diff_stats(sum_stats, old_stats):
# def prettify_stat(stat, dstat, console=True):
# def dump_stats(config_settings, database):
# def fetch_stats(config_settings, twitter_inst):
# def main(argv):
# 
# Path: db_connectors/con_sqlite.py
# class sqliteConnector:
#     def __init__(self, database_path, verbose=True):
#     def init_database(self, table, table_spec):
#     def dataset_exists(self, table, dataset, compare_fields):
#     def insert_dataset(self, table, dataset):
#     def commit_close(self):


from afl_utils import afl_stats
from db_connectors import con_sqlite
    import simplejson as json
    import json
import os
import socket
import unittest
            'pending_favs': 1,
            'execs_per_sec': 0,
            'fuzzer_pid': 0.0,
            'paths_total': 420.0,
            'unique_crashes': 1,
            'execs_done': 0,
            'afl_banner': 'target_000',
            'unique_hangs': 13.0,
            'host': socket.gethostname()[:10]
        }
        self.assertIsNotNone(afl_stats.prettify_stat(other_sum_stats, other_diff_stats))

        other_diff_stats = {
            'fuzzers': -1,
            'pending_total': 1,
            'paths_favored': 25.0,
            'pending_favs': 1,
            'execs_per_sec': -1,
            'fuzzer_pid': 0.0,
            'paths_total': 420.0,
            'unique_crashes': -1,
            'execs_done': -10,
            'afl_banner': 'target_000',
            'unique_hangs': 13.0,
            'host': socket.gethostname()[:10]
        }
        self.assertIsNotNone(afl_stats.prettify_stat(test_sum_stats, other_diff_stats))

    def test_dump_stats(self):
        config_settings = {'fuzz_dirs': ['./testdata/sync/']}

# Path: afl_utils/afl_stats.py
# def show_info():
# def read_config(config_file):
# def twitter_init(config):
# def shorten_tweet(tweet):
# def fuzzer_alive(pid):
# def parse_stat_file(stat_file, summary=True):
# def load_stats(fuzzer_dir, summary=True):
# def summarize_stats(stats):
# def diff_stats(sum_stats, old_stats):
# def prettify_stat(stat, dstat, console=True):
# def dump_stats(config_settings, database):
# def fetch_stats(config_settings, twitter_inst):
# def main(argv):
# 
# Path: db_connectors/con_sqlite.py
# class sqliteConnector:
#     def __init__(self, database_path, verbose=True):
#     def init_database(self, table, table_spec):
#     def dataset_exists(self, table, dataset, compare_fields):
#     def insert_dataset(self, table, dataset):
#     def commit_close(self):


# Path: tests/test_afl_stats.py
from afl_utils import afl_stats
from db_connectors import con_sqlite
    import simplejson as json
    import json
import os
import socket
import unittest

            'pending_favs': 1,
            'execs_per_sec': 0,
            'fuzzer_pid': 0.0,
            'paths_total': 420.0,
            'unique_crashes': 1,
            'execs_done': 0,
            'afl_banner': 'target_000',
            'unique_hangs': 13.0,
            'host': socket.gethostname()[:10]
        }
        self.assertIsNotNone(afl_stats.prettify_stat(other_sum_stats, other_diff_stats))

        other_diff_stats = {
            'fuzzers': -1,
            'pending_total': 1,
            'paths_favored': 25.0,
            'pending_favs': 1,
            'execs_per_sec': -1,
            'fuzzer_pid': 0.0,
            'paths_total': 420.0,
            'unique_crashes': -1,
            'execs_done': -10,
            'afl_banner': 'target_000',
            'unique_hangs': 13.0,
            'host': socket.gethostname()[:10]
        }
        self.assertIsNotNone(afl_stats.prettify_stat(test_sum_stats, other_diff_stats))

    def test_dump_stats(self):
        config_settings = {'fuzz_dirs': ['./testdata/sync/']}

        lite_db = con_sqlite.sqliteConnector('./testdata/afl-stats.db', verbose=True)