Giter Site home page Giter Site logo

ocf's Introduction

Open CAS Framework

Build Status Tests Status Coverity status codecov License

Open CAS Framework (OCF) is high performance block storage caching meta-library written in C. It's entirely platform and system independent, accessing system API through user provided environment wrappers layer. OCF tightly integrates with the rest of software stack, providing flawless, high performance, low latency caching utility.

In this readme:

Documentation

OCF documentation is available on GitHub Pages. Doxygen API documentation is available here.

Source Code

Source code is available in the official OCF GitHub repository:

git clone https://github.com/Open-CAS/ocf.git
cd ocf

Deployment

OCF doesn't compile as separate library. It's designed to be included into another software stack. For this purpose OCF provides Makefile with two useful targets for deploying its source into target directories. Assuming OCFDIR is OCF directory, and SRCDIR and INCDIR are respectively your source and include directories, use following commands to deploy OCF into your project:

make -C $OCFDIR src O=$SRCDIR
make -C $OCFDIR inc O=$INCDIR

By default this will not copy OCF source files but create symbolic links to them, to avoid source duplication and allow for easy OCF code modification. If you prefer to copy OCF source files (e.g. you don't want to distribute whole OCF repository as your submodule) you can use following commands:

make -C $OCFDIR src O=$SRCDIR CMD=cp
make -C $OCFDIR inc O=$INCDIR CMD=cp

Examples

OCF is shipped with examples, which are complete, compillable and working programs, containing lot of comments that explain basics of caching. They are great starting point for everyone who wants to start working with OCF.

Examples can be found in directory example/.

Each example contains Makefile which can be used to compile it.

Unit Tests

OCF is shipped with dedicated unit test framework based on Cmocka.
To run unit tests you need to install following packages:

  • Cmake (>= 3.8.1)
  • Cmocka (>= 1.1.1)
  • ctags (>= 5.8)

To run unit tests use following command:

./tests/unit/framework/run_unit_tests.py

Build Test

OCF repository contains basic build test. It uses default POSIX environment. To run this test, use following commands:

cd tests/build/
make

Functional Tests

OCF repository contains dedicated functional test framework written in python and executed via pytest. With the use of ctypes it is possible to call, wrap ocf functions and use C compatible data types.
To run functional tests you need to install the following:

  • python3 (>=3.6.7)
  • pytest (Install with pip3 install pytest)

To run all functional tests (in compliance with the configuration file) compile using makefile located in ./tests/functional/Makefile and then use the following command:

pytest

Contributing

Feel like making OCF better? Don't hesitate to submit a pull request!
You can find more information about our contribution process here.
In case of any questions feel free to contact maintainer.

ocf's People

Contributors

micrakow avatar kamillepek avatar arutk avatar mmkaypl avatar ostrokrzew avatar mmichal10 avatar michalwy avatar katlapinka avatar deixx avatar pdebski21 avatar kmajzero avatar robertbaldyga avatar live4thee avatar amirharoush-huawei avatar wolszews avatar andrzejjakowski avatar beef9999 avatar docentszachista avatar felipe-barajas avatar josehu07 avatar loyou avatar svelar avatar rafalste avatar minneyjohn avatar

Watchers

 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.