Giter Site home page Giter Site logo

valkyrie-benchmark's Introduction

Valkyrie::Benchmark

A framework to measure the performance of various back end adapters of Valkyrie.

Benchmarking results

See RESULTS.md

Installation

You will need to install and configure the databases and other back ends. See the config files in config/metadata_adapters and adjust as needed. You can also disable individual adapters using these files.

Depending on the adapter, you might also need to run database migrations See examples below for how to setup some of the adapters. Exact details will wary depending on your system configuration. Warning, the repository will get wiped when you run the benchmarks.

ActiveRecord Sqlite

Only need to run migrations

bundle exec bin/benchmark migrate active_record_sqlite

ActiveRecord Mysql

Create database and login. In mysql client (mysql -u root) run

create database valkyrie_benchmark_ar_mysql;
grant all privileges on valkyrie_benchmark_ar_mysql.* to 'valkyrie_benchmark'@'localhost' identified by 'valkyrie_benchmark';

Then run migrations

bundle exec bin/benchmark migrate active_record_mysql

ActiveRecord Postgres

Create database and login. In psql client (sudo -u postgres psql) run

create user valkyrie_benchmark password 'valkyrie_benchmark';
create database valkyrie_benchmark_ar_postgres owner = valkyrie_benchmark;

Then run migrations

bundle exec bin/benchmark migrate active_record_postgres

If Ruby complains about authentication failing, you will probably need to enable MD5 authentication in /etc/postgresql/x.x/main/pg_hba.conf. Add this line

local all valkyrie_benchmark md5

Then restart postgres and try migrations again.

Postgres

This is very similar to the previous adapter. You will just use a different database name and different migrations. It's assumed you have already created the user, otherwise you'll need to run the create user line above before creating the database.

Create the database. In psql client (sudo -u postgres psql)

create database valkyrie_benchmark_postgres owner = valkyrie_benchmark;

Then run migrations

bundle exec bin/benchmark migrate postgres

The first part of migrations creates the 'uuid-ossp' extension which may require root privileges. In this case, do this part manually. Start psql with sudo -u postgres psql valkyrie_benchmark_postgres and run

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

Then try migrations again the normal way.

Sequel Postgres

Again, very similar to the previous two Postgres based adapters. Just create a new database in psql client (sudo -u postgres psql). Assuming you've already created the user just run

create database valkyrie_benchmark_sequel_postgres owner = valkyrie_benchmark;

Then run migrations

bundle exec bin/benchmark migrate sequel_postgres

Same as last adapter, you may need to create the uuid-ossp extension manually if there is a permissions problem

Fedora

Easiest method is to use the fcrepo_wrapper. You only need to run bundle exec fcrepo_wrapper in a separate console window and leave it running. No migrations need to be run.

Solr

Similar to Fedora, the easiest method is to use the solr_wrapper. You only need to run bundle exec solr_wrapper in a separate console window and leave it running. No migrations need to be run.

Note that using the Solr adapter will give a lot of warnings about persisting new resources but it should still work.

Redis

Just ensure you have Redis installed and running in port 6379, or change the settings in config/metadata_adapters/redis.yml.

Note that Redis adapter does not support alternate identifiers, thus the alternate_id_tests will not work.

Basic usage

To run all enabled tests using all enabled adapters, run

bundle exec bin/benchmark start

For information about other options run bundle exec bin/benchmark and bundle exec bin/benchmark help start

valkyrie-benchmark's People

Contributors

ojlyytinen avatar tpendragon avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.