Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
How to build
Clone this wiki locally
For Java dependencies look in the
pom.xml file, these will be installed
automatically. Native dependencies are:
- unittest++ - a unit testing library
To install :
sudo apt-get install cmake libunittest++-dev maven pkg-config
On Arch Linux:
pacman -S base-devel cmake unittestpp maven pkg-config
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.
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
How to run tests
Java tests can just be run with the normal maven commands (eg
mvn test or
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_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.
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.