Exemplo n.º 1
0
int main(int argc, char *argv[])
{
    char *database_filename = "c_perf.db";
    int rc;
    sqlfs_t *sqlfs = 0;

    if(argc > 1)
      database_filename = argv[1];
    if(exists(database_filename))
       printf("%s exists.\n", database_filename);
    printf("Opening %s\n", database_filename);
    sqlfs_init(database_filename);
    printf("Running tests:\n");

    rc = sqlfs_open(database_filename, &sqlfs);
    printf("Opening database...");
    assert(rc);
    printf("passed\n");

    run_perf_tests(sqlfs, WRITESZ);

    printf("Closing database...");
    sqlfs_close(sqlfs);
    printf("done\n");

    printf("\n------------------------------------------------------------------------\n");
    printf("Running tests using the thread API, i.e. sqlfs == 0:\n");
    run_perf_tests(0, WRITESZ);

    return 0;
}
Exemplo n.º 2
0
int main(int argc, char *argv[])
{
    char *database_filename = "c_perf_key.db";
    int rc;
    sqlfs_t *sqlfs = 0;

    if(argc > 1)
      database_filename = argv[1];
    if(exists(database_filename))
       printf("%s exists.\n", database_filename);
    printf("Opening %s\n", database_filename);
    sqlfs_init(database_filename);
    printf("Running tests:\n");

    rc = sqlfs_open_key(database_filename, "mysupersafepassword", &sqlfs);
    printf("Opening database...");
    assert(rc);
    printf("passed\n");

    run_perf_tests(sqlfs, WRITESZ);

    printf("Closing database...");
    sqlfs_close(sqlfs);
    printf("done\n");
    return 0;
}
void
gridfs_parallel_perf (void)
{
   perf_test_t *tests[] = {
      multi_upload_perf_new (), multi_download_perf_new (), NULL,
   };

   run_perf_tests (tests);
}
void
gridfs_perf (void)
{
   perf_test_t *tests[] = {
      upload_perf_new (),
      download_perf_new (),
      NULL,
   };

   run_perf_tests (tests);
}
Exemplo n.º 5
0
int main(int argc, char *argv[])
{
    char *database_filename = "c_perf_key.db";
    int rc;
    sqlfs_t *sqlfs = 0;

    if(argc > 1)
      database_filename = argv[1];
    if(exists(database_filename))
       printf("%s exists.\n", database_filename);

    printf("Opening %s...", database_filename);
    rc = sqlfs_open_password(database_filename, "mysupersafepassword", &sqlfs);
    assert(rc);
    printf("passed\n");

    run_perf_tests(sqlfs, WRITESZ);

    printf("Closing database...");
    rc = sqlfs_close(sqlfs);
    assert(rc);
    printf("done\n");


    printf("\n------------------------------------------------------------------------\n");
    printf("Running tests using the thread API, i.e. sqlfs == 0:\n");

    printf("Initing %s\n", database_filename);
    rc = sqlfs_init_password(database_filename, "mysupersafepassword");
    assert(rc == 0);

    run_perf_tests(0, WRITESZ);

    printf("Destroying:\n");
    rc = sqlfs_destroy();
    assert(rc == 0);

    rc++; // silence ccpcheck

    return 0;
}