Git Product home page Git Product logo

boost_unlink's Introduction

boost_unlink

Test code for mongodb drop database

Setup install dependencies

Ubuntu

>  sudo apt-get install cmake -y 
>  sudo apt-get install build-essential checkinstall -y 

Centos 6.3:

> sudo yum install cmake -y 

Install boost 1.49.0

> wget -c 'http://sourceforge.net/projects/boost/files/boost/1.49.0/boost_1_49_0.tar.bz2/download'
> tar xf boost_1_49_0.tar.bz2
> cd boost_1_49_0/

To install for a single user locally > export BOOST_ROOT=$HOME/boost > mkdir $BOOST_ROOT > ./bootstrap.sh --prefix=$BOOST_ROOT > ./b2 install

To install for a all users (needs sudo) > ./bootstrap.sh > sudo ./b2 install

Build Project

Please ensure you have set BOOST_ROOT in this shell

> mkdir ./build
> cmake .. 
> make 

Compiling

To use Boost_USE_STATIC_LIBS and Boost_USE_STATIC_RUNTIME are set on in the config but you can always add :

-DBoost_USE_STATIC_LIBS=ON -DBoost_USE_STATIC_RUNTIME=ON

To enable debug use :

-DBoost_DEBUG=on

Clean the project:

Set the BOOST_ROOT to the correct value.

> rm -rf ./build && mkdir ./build && cd ./build &&  cmake ..

Source

.
├── CMakeLists.txt              # cmake config file
├── LICENSE
├── README.md
└── src
    ├── cmdline.cpp             # process the command line options
    ├── main.cpp                # simple mainline wrapper
    ├── util.cpp                # util methods to prime the test
    └── mongo_ops.cpp           # the ops to test 

Getting Help :

$ ./boost_unlink  --help 
Allowed options:

Generic options:
  -h [ --help ]         produce help message
  -v [ --verbose ]      be more verbose (include multiple times for more 
                        verbosity e.g. -vvvvv)
  --dbpath arg          the target directory
  --dryrun              do a dryrun
  --preallocate         preallocate files pf the correct sizes
  --directoryperdb      each database will be stored in a separate directory, 
                        <default to false>)
  --setup               only setup the directory/files, <default to false>)
  -f [ --files ] arg    the number of files

Invoking the executable

> sudo mkdir /data/boost_unlink
> sudo chown <username> /data/boost_unlink
> ./boost_unlink testing --files 6  -vvvvv 
> ./boost_unlink testing --files 6  -vvvvv --directoryperdb
> ./boost_unlink testing --files 6   --directoryperdb --dbpath=/data/boost_unlink
> ./boost_unlink testing --files 6   --dbpath=/data/boost_unlink
> ls /tmp/boost_unlink/testing

boost_unlink's People

Contributors

jimoleary avatar ghartnett avatar

Watchers

 avatar 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.