Get started in few easy steps with profiling your applications using gProfiler by Granulate. gProfiler is an open source continuous code profiling tool, designed to help developer and DevOps teams visualize their application’s execution sequences and resource usage.
Continuous profiling reveals opportunities to optimize resource-consuming parts of the code, and addressing them can significantly improve application performance and costs. gProfiler makes it easy for any team to get a comprehensive profile of their code, with multi-runtime support packed into a single deployment and an accompanying UI that makes investigating performance simple.
This 1 click droplet comes pre-installed with gProfiler software, Java, and libraries to let you run crypto benchmarks and openssl benchmarks. In a few minutes you are able to see the profiling information on gProfiler dashboard in the form of a flamegraph.
gProfiler is a unique and value-added code profiling tool, due to its open source, always-on and system-wide nature. By aggregating resource utilization data from profiling nodes in the cluster and across multiple environments, DevOps and developers get a comprehensive and live understanding of what is demanding their machines’ resources. gProfiler is also free, requires no code changes or complicated installation, and has a performance penalty of less than one percent.
More Information:
Click the Deploy to DigitalOcean button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account.
In addition to creating a Droplet from the Intel gProfiler Crypto Demo 1-Click App using the control panel, you can also use the DigitalOcean API. As an example, to create a 4GB Intel gProfiler Crypto Demo Droplet in the SFO2 region, you can use the following curl
command. You need to either save your API access token) to an environment variable or substitute it in the command below.
curl -X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer '$TOKEN'' -d \
'{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image": "intel-intelgprofilercr"}' \
"https://api.digitalocean.com/v2/droplets"
Step 1: Access to your droplet. Open a terminal on your computer to access your Droplet as the root user using the following command:
ssh root@your\_droplet\_public\_ipv4
Step 2: Create an account for gProfiler dashboard. Visit https://profiler.granulate.io/login and create a free account.
Step 3: Navigate to Create a service on gProfiler portal to aggregate profiling data.
Once you have created an account and logged into gProfiler portal, click the “plus” icon and create a service. This lets you create a service of your choice of naming the service. As part of this guide, we have already provided a service name “openssl_java_crypto_bench” that will be created when you run the benchmark script as mentioned in the steps below.
Step 4: Get the gProfiler API Key. On the add service page, select “Command Line” from the list of available installation methods. Under the command line installation instructions, the first component is the user unique API key. This identifies that the key is associated with your account and gProfiler will use this key to push profiling data into your own dashboard.
Step 5: Run the benchmark for crypto and openssl. On the command prompt, run the following command for executing the crypto benchmark (Replace API_KEY with the API key found in Step 4). Wait for the execution to complete and complete any prompts the system asks you to perform.
sudo ./benchmark.sh API\_KEY
Step 6: Go to gProfiler dashboard to see profiling data. Once the benchmark runs have completed, go to the gProfiler dashboard, click the service called openssl_java_crypto_bench, and see your profiling data. You can see the function calls and stack trace in the flamegraph. You can search for specific keywords like “crypto” or “openssl” on the gProfiler dashboard to see how those functions are performing. The color legends represent the programming language. For example, the orange color is for all Java. The dashboard provides several other options to view and filter the information. A sample screen shot is provided below.
Step 7: After the script is done running, and the data has shown up on gProfiler, you can destroy the droplet. Otherwise, if you want to keep the droplet running, but stop having gProfiler send data to your gProfiler dashboard, use the command below.
sudo pkill -TERM gprofiler