Skip to content
Richard Warburton edited this page Aug 16, 2015 · 23 revisions

Installing Dependencies

For Java dependencies look in the pom.xml file, these will be installed automatically, apart from the protobuf compiler. Native dependencies are:

  • unittest++ - a unit testing library
  • protobuf-compiler - the compiler for protobuf messages

To install :

  • On debian/ubuntu:

     sudo apt-get install cmake libunittest++-dev protobuf-compiler npm maven
    
  • On Arch Linux:

     pacman -S base-devel cmake unittestpp protobuf nodejs maven
    
  • On Fedora:

     yum install cmake protobuf-compiler unittest-cpp-devel npm maven
    

Notes on JDK Version

The profiling agent will happily run under OpenJDK, but in order to use the Javafx UI you need to use the Oracle JDK.

Compiling

Successful compilation of the C++ sources currently requires the definition of a JAVA_HOME due to JNI dependencies. Successful compilation of Java code requires JAVA_HOME to support JavaFX classes, and so it is required that the JAVA_HOME points to a Sun/Oracle JDK (OpenJDK/Zulu will fail to build).

cmake CMakeLists.txt
export LC_ALL=C
mvn clean package -DskipTests

If you just want to compile the C++ code then the Makefile generated by cmake works independently of maven.

How to run tests

Java tests can just be run with the normal maven commands (eg mvn test or mvn package).

To run the C++ agent tests you can run make clean && make in order to compile them, followed by ./build/unitTests to run them with detailed failure output or make clean && make test to run them in one step.

Custom UnitTest++ (Optional)

Some systems don't have pkgconfig setup for UnitTest++ which makes the agent build fail. If you need to manually configure the include and library path then you can the environment variables UNITTEST_INCLUDE_DIRS and UNITTEST_LIBRARIES. Here's an example:

UNITTEST_INCLUDE_DIRS="/usr/include/unittest++/" UNITTEST_LIBRARIES="UnitTest++" cmake CMakeLists.txt

DO NOT set one without setting the other - you'll just fail to compile or link.

Installation

After running mvn package you will get a zip file called target/honest-profiler.zip. You can extract this to a directory and run it from there.

see [How to Run](How to Run) for details on how to use the profiler.

Clone this wiki locally