Ejemplo n.º 1
0
int main(int argc, char const ** argv)
{
    Options<Global> globalOptions;
    int ret = parseOptions(globalOptions, argc, argv);
    if (ret)
        return ret;
    
    if (globalOptions.selectedCommand == COMMAND_BUILD_STANDARD) {
        CommandLineParser parser;
        setUpCommandLineParser(parser, BuildGoldStandard());
        Options<BuildGoldStandard> options;
        int ret = parseCommandLineAndCheck(options, parser, argc, argv);
        if (options.showHelp)
            return 0;
        if (ret != 0)
            return ret;
        return buildGoldStandard(options);
    } else if (globalOptions.selectedCommand == COMMAND_EVALUATE) {
        CommandLineParser parser;
        setUpCommandLineParser(parser, EvaluateResults());
        Options<EvaluateResults> options;
        int ret = parseCommandLineAndCheck(options, parser, argc, argv);
        if (options.showHelp)
            return 0;
        if (ret != 0)
            return ret;
        return evaluateReadMapperResult(options);
    } else {
        SEQAN_ASSERT_FAIL("Invalid reads type!");
    }

    return 0;
}
Ejemplo n.º 2
0
PRIntn main(PRIntn argc, char *argv[])
{
    PLOptStatus os;
	PLOptState *opt = PL_CreateOptState(argc, argv, "dhp:P:a:A:i:s:t:");
	while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
    {
		if (PL_OPT_BAD == os) continue;
        switch (opt->option)
        {
        case 'a':  /* arena Min size */
            arenaMin = atol( opt->value );
            break;
        case 'A':  /* arena Max size  */
            arenaMax = atol( opt->value );
            break;
        case 'p':  /* pool Min size */
            poolMin = atol( opt->value );
            break;
        case 'P':  /* pool Max size */
            poolMax = atol( opt->value );
            break;
        case 'i':  /* Iterations in stress tests */
            stressIterations = atol( opt->value );
            break;
        case 's':  /* storage to get per iteration */
            maxAlloc = atol( opt->value );
            break;
        case 't':  /* Number of stress threads to create */
            stressThreads = atol( opt->value );
            break;
        case 'd':  /* debug mode */
			debug_mode = 1;
            break;
        case 'h':  /* help */
        default:
            Help();
        } /* end switch() */
    } /* end while() */
	PL_DestroyOptState(opt);

    srand( (unsigned)time( NULL ) ); /* seed random number generator */
    tLM = PR_NewLogModule("testcase");


#if 0
	ArenaAllocate();
	ArenaGrow();
#endif

    MarkAndRelease();

    Stress();

    return(EvaluateResults());
} /* end main() */