Giter Site home page Giter Site logo

nagoya-cabinet's Introduction

nagoya-cabinet

A DBMS, sortof. Implemented in Rust, 0.10-ish.

How to build

Until I figure out what the best way to build the code is, calling the compiler rustc should be easiest.

Either grab a Rust 0.10 package from your package manager (Arch Linux ships it in [community]), other distros might offer PPAs or COPRs or other third-party repositories. Alternatively, grab the source (takes long to compile) or a precompiled package from rust-lang.org and install it.

I'll be trying to be compatible with a released version of Rust and not a nightly for convenience. Stuff is changing fast.

Build sorting

cd external-sort
# now there's two alternatives: either build the binary or the unit test
# start with the binary
rustc sort.rs
# run sort
./sort inputFile outputFile memoryBufferInMB
# need debug/info output? debug prints *every single number*, takes forever
RUST_LOG=info ./sort …
RUST_LOG=debug ./sort …
# here's how to build the unit test
rustc --test sort.rs
# run unit test
./sort
# this test generates random data, sorts in 100MB chunks, merges the chunks
# and verifies that the result is ordered.

Build buffer

The buffer implementation can be tested with the built-in testsuite. Unfortunately, it doesn't take command line arguments, but you can specify environment variables to specify some parameters if you like. Or don't, some defaults are provided.

cd src
rustc --test cabinet.rs
env THREADS=a PAGES_ON_DISK=b PAGES_IN_RAM=c ./cabinet

Build cabinet

This will build the complete test suite.

cd src
rustc --test cabinet.rs
./cabinet

Individual tests can be specified via module::test_name, e.g. btree::simple_insert. To get more information output, the RUST_LOG variable can be used as above.

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.