- Ruby 2+
- bundler
- Cbc solver (see the Dockerfile for packages on Ubuntu, Homebrew maybe useful on Mac OS, but has not been tested)
Once dependencies have been installed, clone the repository and install the necessary Ruby gems
git clone https://github.com/michaelmior/nose-cli.git
cd nose-cli
bundle install --without=development mysql
Examples of the workload input format is given in the workloads/
directory.
These workloads should give you a sense of the input format and can be a starting point for your own workloads.
For example, to run the schema advisor against the workload rubis
, simply execute the command below
bundle exec nose search rubis
If you are prompted, accept the default configuration.
Each recommended physical structure is referred to as an "index" and will be the first set of outputs.
These indexes will be followed by a list of plans for each query which makes use of these indexes.
More information on the other commands available can be found with bundle exec nose help
.
If you have any questions, please open an issue or contact @michaelmior.
Testing has been done with Ruby 2+ but most of the code should also run under the latest JRuby.
However, under JRuby, any code depending on C extensions or MRI internals should be excluded with --without=development mysql
.
All source code is documented and more details on the command line tool can be retrieved by running bundle exec nose help
.
You can view complete documentation by running bundle exec rake doc
and viewing the output in the doc/
directory.
Tests are written using RSpec and can be executed with bundle exec rspec
.
If you do not have a copy of the Cbc solver available, you can exclude tests depending on it with --tag ~solver
.
Some commands require a configuration file in lieu of command line options. An example configuration file for the different components of NoSE is given in nose.yml.example. Unfortunately, the line between what is configured in the configuration file and command line flags is currently somewhat blurry.
To define a workload and model named foo
, start by creating foo_model.rb
and foo_workload.rb
.
You can use any of the models and workloads from the main NoSE repository as a template.
In the Model
directive in your workload file (e.g. foo_workload.rb
), specify the path to your model file, such as Model './foo_model.rb'
.
Then when running NoSE, use bundle exec nose search ./foo_workload.rb
where ./foo_workload.rb
is the path to your workload file.
These paths can either be absolute paths or relative to the current working directory.
This work was supported by the Natural Sciences and Engineering Research Council of Canada (NSERC).
Hosting of Coin-OR packages is generously provided by packagecloud.