package Ġcom . atlassian . performance . tools . aws infrastructure . api . jira Ċ Ċ import Ġcom . atlassian . performance . tools . aws infrastructure . api . Remote Location Ċ import Ġcom . atlassian . performance . tools . concurrency . api . submit With Log Context Ċ import Ġcom . atlassian . performance . tools . infrastructure . api . Measurement Source Ċ import Ġcom . atlassian . performance . tools . infrastructure . api . jvm . j mx . J mx Client Ċ import Ġcom . atlassian . performance . tools . jv mt ask s . api . Task Timer . time Ċ import Ġcom . google . common . util . concurrent . Thread Factory Builder Ċ import Ġjava . net . URI Ċ import Ġjava . util . concurrent . Executors Ċ Ċ class ĠJira ( ĊĠĠĠ Ġprivate Ġval Ġnodes : ĠList < Started Node >, ĊĠĠĠ Ġval Ġj ira Home : ĠRemote Location , ĊĠĠĠ Ġval Ġdatabase : ĠRemote Location ?, ĊĠĠĠ Ġval Ġaddress : ĠURI , ĊĠĠĠ Ġval Ġj mx Clients : ĠList < J mx Client > Ġ= Ġempty List () Ċ ) Ġ: ĠMeasurement Source Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġgather Results () Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġexecutor Ġ= ĠExec utors . new Fixed ThreadPool ( ĊĠĠĠĠĠĠĠĠĠĠĠ ĠMath . min ( nodes . size , Ġ 4 ), ĊĠĠĠĠĠĠĠĠĠĠĠ ĠThread Factory Builder () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. setName Format (" results - gather ing - thread -% d ") ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠĠĠĠĠ Ġnodes . map Ġ{ Ġexecutor . submit With Log Context (" gather Ġ$ it ") Ġ{ Ġit . gather Results () Ġ} Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. forEach Ġ{ Ġit . get () Ġ} ĊĠĠĠĠĠĠĠ Ġtime (" gather Ġanalytics ") Ġ{ Ġnodes . first (). gather An alytic Logs () Ġ} ĊĠĠĠĠĠĠĠ Ġexecutor . shutdown Now () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠtoString () Ġ= Ġ" J ira ( address =$ address )" Ċ }