Giter VIP home page Giter VIP logo

mbuild's Introduction

MBuild

Build Status

A utility that helps doing C++ compilation-related measurements. It detects the compilers available on the system and compiles the code using them. It outputs the results in a JSON document.

Supported platforms

It is tested on Ubuntu.

Compilation

The utility is implemented in C++. It can be compiled using the build.sh script.

Usage

The mbuild binary detects compilers installed on the system and can compile one or more source files using them. The output is a JSON document, containing all the measurement results.

Compiler detection

The utility detect the compilers the following way:

  • It checks the entries of the PATH environment variable.
  • It checks the following directories as well: /bin, /usr/bin, /usr/local/bin, $HOME/bin

It checks the following binaries in the above directories:

  • clang*, templight*: checks if they are Clang compilers
  • gcc*, g++*: check is they are GCC compilers

To see which compilers were found by the utility, run mbuil --compilers

Running the measurements

The files to compile can be provided as positional arguments. More files can be provided and all of them will be measured using all compilers. For example: mbuild test.cpp other_test.cpp

Output format

The output format is a JSON document. It is displayed on standard output and can be redirected. The JSON document contains a list of objects. Each object represents one measurement. It has the following fields:

  • filename: the name of the source file. For example: "test.cpp"
  • compiler name: the name of the compiler measured. For example: "gcc"
  • compiler version: the version of the compiler. For example: "5.3.0"
  • optimisation: the optimisation level used for the compilation. It is a string, its values are compiler-dependent.
  • compiles: was the compilation successful? For example: true.
  • stdout: the standard output of the compiler.
  • stderr: the standard error of the compiler.
  • user_time: the number of seconds (user time output of the time command), the compilation took. For example: 1.234. Note that this is present for successful compilations only.
  • memory: the maximum memory consumption of the compiler (in Kb). For example: 12345. Note that this is present for successful compilations only.
  • template instantiations: the number of template instantiations. For example: 13. Note that this is present only if the compiler has Templight support. Note that by installing Metashell on your system you get Templight as well (which MBuild can find and use).

License

Metashell is published under the GNU General Public License, version 3.

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.