If JIRA Client takes too long time to perform a certain action, you may help developers to investigate the cause by collecting and sending CPU performance snapshot.
How to collect the snapshot on Mac OS
Before you can proceed you have to download and unpack additional tools:
- Download jc-yjp-mac.tar.gz file
- Unpack it. To do so you may invoke 'Open' action on this file from Finder.
You can unpack the file from your Terminal with the command line 'gunzip -c jc-yjp-mac.tar.gz | tar xopf -'. Note you need to 'cd' to the directory with the file.
Starting JIRA Client
To collect the snapshot you need to start JIRA Client with special command line parameters.
- Close JIRA Client if it is running
- Open Terminal
- cd to the directory with unpacked jc-yjp-mac.tar.gz files. For example: 'cd ~/Downloads/jc-yjp-mac'
- Start JIRA Client from Terminal: './jiraclient.sh'
This starts JIRA Client with CPU profiling agent.
If your workspace is located in non-default directory provide path to it with first parameter: './jiraclient.sh /path/to/your/workspace'
- To control the agent open another Terminal window and cd to the same directory: 'cd ~/Downloads/jc-yjp-mac'
Now you are ready to collect CPU snapshot.
Collecting the snapshot
The following instructions tells you how to collect CPU snapshot for a specific JIRA Client activity. This collects performance data from the moment when you start profiling till you stop it.
Before you begin, prepare JIRA Client:
- Turn off automatic synchronization for all connections by invoking 'Get Changes in Background | Off' from popup menu on every connection node in Navigation Tree.
- Prepare to run the action that starts the slow activity. For example load query results into Issue Table or open a window with the action.
- Wait till JIRA Client completes any synchronization it may do at start up
These preparation steps help getting cleaner snapshot without any additional activity and this helps JIRA Client developers to investigate your performance problem.
When you are ready to start the long-running activity:
- switch to the Terminal window and run
The command will print 'CPU sampling started' message to the Terminal and terminates.
- Switch back to the JIRA Client window and start the long-running activity
- Wait until the activity completes
- Switch to the Terminal window and run
The command output into Terminal should look like the following:
Snapshot captured: /Users/userName/Downloads/jc-yjp-mac/jiraclient-2017-10-03.snapshot
CPU profiling stopped
after which the script shall terminate.
- The performance snapshot is stored in the file. Please, send this file to ALMWorks for investigation - generally you can attach it to the Service Desk ticket, but if it is larger than 20Mb, please, request an upload link from ALM Works support.
You may collect several snapshots by running './start-cpu.sh' and './capture-cpu.sh' commands from the Terminal window.
If you collect several spanshots, please select one or two of them.
Profiling synchronization problems
Background synchronization may significantly slow down other JIRA Client features. But as you have the background synchronization turned off as one of preparation steps, your problem may become not reproducible.
In this case manually start synchronization right after you start CPU profiling with './start-cpu.sh' command, before you start a long-running activity that shows the problem. To do so invoke 'Get Changes Now' action from popup menu on the Connection node in Navigation Tree.
The profiling agent creates log files in the '/Users/<username>/.yjp' directory. This directory is not needed when you are done, you may delete it.