TFS4JIRA Self-Hosted - How to track the performance of live and initial synchronization

This article presents how users can track the performance of live and initial synchronization in TFS4JIRA Self-Hosted.

Live profiles synchronisation

The performance entries can be found in the TFS4JIRA log files:

  • Default location: C:\inetpub\wwwroot\tfs-jira-synchronizer\App_Data\log

  • Files: tfssync.log, tfssync.log.(1-10)

The below is not applicable for entries concerning Initial Synchronisation.

Just before the PROFILE sync ends, TFS4JIRA logs an entry providing information on how long it took to sync the profile and how many items were updated. Please expect to see the following lines in the logs files:

  • 2023-04-27 00:51:29,393 [17] INFO Workers.SynchronizationWorker - Profile "MEGASTORM | DEMO" synchronization START

  • …several log lines…

  • 2023-04-27 12:51:38,390 [23] DEBUG SingleSynchronization.JiraSingleSynchronizationCycle - Synchronized 0 issues to work items.

  • 2023-04-27 12:51:38,540 [23] DEBUG SingleSynchronization.TfsSingleSynchronizationCycle - Synchronized 0 work items to issues.

  • 2023-04-27 12:51:38,540 [23] DEBUG Analytics.RealtimeSynchronizationAnalyticsService - Synchronization of profile took: 0.9725031s; Items updated count: 0

  • 2023-04-27 00:52:16,456 [21] INFO Workers.SynchronizationWorker - Profile "MEGASTORM | DEMO" synchronization END

Performance.csv

  • default location: C:\inetpub\wwwroot\tfs-jira-synchronizer\App_Data\log

  • files: performance.csv, performance.csv.<yyyy.MM.dd>

You can expect to see the following entries in the above files when you add Environment Variables into the Windows system where TFS4JIRA is installed.

  • 1682689888,item_sync_started,2023-04-28T12:52:24.6672414,1682686344667

  • 1682689888,item_sync_succeeded,2023-04-28T12:52:32.1827313,1682686352182

  • Sync session id: 1682689888 Item: 1262 took 7.5154899 seconds to synchronize

  • 1682689888,item_sync_started,2023-04-28T12:52:32.1983587,1682686352198

  • 1682689888,item_sync_succeeded,2023-04-28T12:52:39.6826218,1682686359682

  • Sync session id: 1682689888 Item: 1256 took 7.4842631 seconds to synchronize

  • 1682689888,item_sync_started,2023-04-28T12:52:39.6826218,1682686359682

  • 1682689888,item_sync_succeeded,2023-04-28T12:52:47.5574866,1682686367557

  • Sync session id: 1682689888 Item: 1257 took 7.8748648 seconds to synchronize

When the SYNCHRONIZER_PERFORMANCE_TEST environment variable is set up, the below is added to the performance.csv file.

  • sessionID, task name, date/time, Unix timestamp

  • 1682689888,item_sync_started,2023-04-28T12:52:39.6826218,1682686359682

  • 1682689888,item_sync_succeeded,2023-04-28T12:52:47.5574866,1682686367557

When the ITEM_SYNC_TIMING environment variable is set up, the below is added to the performance.csv file.

It only works with sync from TFS -> JIRA.

  • Sync session id: 1682689888 Item: 1257 took 7.8748648 seconds to synchronize

How to ADD environment variable in Windows system

https://docs.oracle.com/en/database/oracle/machine-learning/oml4r/1.5.1/oread/creating-and-modifying-environment-variables-on-windows.html#GUID-DD6F9982-60D5-48F6-8270-A27EC53807D0