Skip to content
Docker file that creates image for Profiler testing in NetBeans
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Price GitHub

NetBeans - Profiler testing Docker image

This Docker based Profiler tester helps you setup remote machine with Java code running and waiting for NetBeans Profiler to attach.

Project structure

|--                             - MIT license file
|--                              - this file
|-- Dockerfile                             - Docker file for creating image
|--                                 - wrapper script that runs everything
`-- images                                 - sample images show here

Creating profiler server

Before you can proceed, you have to create profiler server inside NetBeans. I suggest to store it inside /tmp/

Open remote profiler settings by choosing: Profile -> Attach to External Process


> git clone
> cd ProfilerDocker
> cp /tmp/ ./
> docker build -t profiler \
--build-arg jdk_location=\
"" \


> docker run -i -t -p 5140:5140 profiler

if you can't use your local port 5140 you can always specify different port forwarding

> docker run -i -t -p $PORT_NO_YOU_WANT:5140 profiler

Attaching to running, remote, JVM

Make sure to Attach from NetBeans and make sure to use localhost as an address of the target machine.

Known limitations

At the moment, ProfilerDocker is using only one architecture for remote profiling: Linux (Intel/AMD) 64bit JVM

Java code used for profiling

ProfilerDocker is based on very simple Java code that runs infinite loop. The loop spawns 2-4 threads, each sleeps 5-10 seconds and allocates memory in range: [512KB, 512MB].

You can find source code here: ProfilerCode.


You can’t perform that action at this time.