예제 #1
0
파일: d4.py 프로젝트: greinerb/mongodb-d4
    aparser = argparse.ArgumentParser(
        formatter_class=argparse.RawDescriptionHelpFormatter,
        description="%s - Distributed Document Database Designer" %
        constants.PROJECT_NAME)

    # Configuration File Options
    aparser.add_argument('--config',
                         type=file,
                         help='Path to %s configuration file' %
                         constants.PROJECT_NAME)
    aparser.add_argument('--print-config',
                         action='store_true',
                         help='Print out the default configuration file.')

    # General Processing Options
    agroup = aparser.add_argument_group(termcolor.bold('General Options'))
    agroup.add_argument(
        '--reset',
        action='store_true',
        help='Reset the internal catalog databases before processing. ' +
        'Warning: This will delete all of the collections in the ' +
        'metadata and workload databases. Use with caution.')
    agroup.add_argument(
        '--no-load',
        action='store_true',
        help='Skip loading input files into system. ' +
        'Use this option if schema statistics and the workload have ' +
        'already been loaded into the catalog database.')
    agroup.add_argument('--no-search',
                        action='store_true',
                        help='Do not perform a search for a database design.')
예제 #2
0
        "%(asctime)s [%(filename)s:%(lineno)03d] %(levelname)-5s: %(message)s",
        datefmt="%m-%d-%Y %H:%M:%S",
        stream=sys.stdout)

    allBenchmarks = getBenchmarks()

    # Simplified args
    aparser = argparse.ArgumentParser(
        description='MongoDB Benchmark Framework')
    aparser.add_argument('benchmark',
                         choices=allBenchmarks,
                         help='The name of the benchmark to execute.')

    # Configuration Options
    agroup = aparser.add_argument_group(
        termcolor.bold('Configuration Options'))
    agroup.add_argument('--config',
                        type=file,
                        help='Path to benchmark configuration file.')
    agroup.add_argument(
        '--print-config',
        action='store_true',
        help=
        'Print out the default configuration file for the benchmark and exit.')

    # Config Override Parameters
    override = {
        "scalefactor": ("SF", float),
        "duration": ("D", int),
        "clients": ("C", str),
        "clientprocs": ("N", int),
예제 #3
0
if __name__=='__main__':
    from util import termcolor
    logging.basicConfig(level = logging.INFO,
                    format="%(asctime)s [%(filename)s:%(lineno)03d] %(levelname)-5s: %(message)s",
                    datefmt="%m-%d-%Y %H:%M:%S",
                    stream = sys.stdout)
    
    allBenchmarks = getBenchmarks()
    
    # Simplified args
    aparser = argparse.ArgumentParser(description='MongoDB Benchmark Framework')
    aparser.add_argument('benchmark', choices=allBenchmarks,
                         help='The name of the benchmark to execute.')
                         
    # Configuration Options
    agroup = aparser.add_argument_group(termcolor.bold('Configuration Options'))
    agroup.add_argument('--config', type=file,
                         help='Path to benchmark configuration file.')
    agroup.add_argument('--print-config', action='store_true',
                         help='Print out the default configuration file for the benchmark and exit.')
                         
    # Config Override Parameters
    override = {
        "scalefactor": ("SF", float),
        "duration":    ("D", int),
        "clients":     ("C", str),
        "clientprocs": ("N", int),
    }
    for key,desc,default in Benchmark.DEFAULT_CONFIG:
        if not key in override: continue
        
예제 #4
0
파일: d4.py 프로젝트: cmu-db/mongodb-d4
    logging.basicConfig(level = logging.INFO,
                        format="%(asctime)s [%(filename)s:%(lineno)03d] %(levelname)-5s: %(message)s",
                        datefmt="%m-%d-%Y %H:%M:%S",
                        stream = sys.stdout)

    aparser = argparse.ArgumentParser(formatter_class=argparse.RawDescriptionHelpFormatter,
                                      description="%s - Distributed Document Database Designer" % constants.PROJECT_NAME)
                                      
    # Configuration File Options
    aparser.add_argument('--config', type=file,
                         help='Path to %s configuration file' % constants.PROJECT_NAME)
    aparser.add_argument('--print-config', action='store_true',
                         help='Print out the default configuration file.')

    # General Processing Options
    agroup = aparser.add_argument_group(termcolor.bold('General Options'))
    agroup.add_argument('--reset', action='store_true',
                         help='Reset the internal catalog databases before processing. ' +
                              'Warning: This will delete all of the collections in the ' +
                              'metadata and workload databases. Use with caution.')
    agroup.add_argument('--no-load', action='store_true',
                        help='Skip loading input files into system. ' +
                             'Use this option if schema statistics and the workload have ' +
                             'already been loaded into the catalog database.')
    agroup.add_argument('--no-search', action='store_true',
                        help='Do not perform a search for a database design.')
    agroup.add_argument('--sess-limit', type=int, metavar='S', default=None,
                        help='Limit the number of sessions to process from the sample workload.')
    agroup.add_argument('--op-limit', type=int, metavar='N', default=None,
                        help='Limit the number of operations to process from the sample workload.')