Skip to content
Richard Warburton edited this page Jul 18, 2018 · 23 revisions

Installing Dependencies

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

  • unittest++ - a unit testing library

To install :

  • On debian/ubuntu:

     sudo apt-get install cmake libunittest++-dev maven pkg-config
    
  • On Arch Linux:

     pacman -S base-devel cmake unittestpp maven pkg-config
    
  • On Fedora:

     dnf install cmake unittest-cpp-devel maven pkgconfig
    
  • On OS X:

     Install cmake (build from source or use a package manager) and unittest-cpp. This will require autoconf, automake and libtool as well if installing from source.
    

Notes on JDK Version

The profiling agent will happily run under Hotspot OpenJDK, but in order to use the Javafx UI you need to use the Oracle JDK. Other JVMs like IBM J9 are not supported at this point in time.

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. If you want to use OpenJDK or Zulu and are running on linux then you can download nightly builds OpenJFX at https://www.chrisnewland.com/openjfx.

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 for details on how to use the profiler.