nacyolsa
03/20/2023, 11:52 AMbeforeSpec { queue.take() }
, afterSpec { queue.add(db) }
Unfortunately I don't see a big improvement of performance. Normally my tests take around 30s. With parallelism=16
only a few seconds better. My CPU has 32 threads. Database server in the container also has access to all 32 threads.
I tried different combinations of parallelism
setting and number of available databases but I didn't notice significant difference.
IntelliJ shows that all my 200 tests take 10s but this time doesn't include time between tests and time taken by building project.
What's wrong with my approach?sam
03/20/2023, 11:53 AMnacyolsa
03/20/2023, 11:56 AMsam
03/20/2023, 11:59 AMnacyolsa
03/20/2023, 12:09 PMconcurrentSpecs=16
didn't make difference but concurrentSpecs=1
works 20s slowerChris Lee
03/20/2023, 12:51 PMnacyolsa
03/20/2023, 1:02 PMparallelism
, less dbs than parralelism, more dbs than parallelism. I don't see difference. For example there is no difference between parallelism=16
with 10 dbs and parallelism=8
with 8 dbs.Adam S
03/20/2023, 1:05 PMnacyolsa
03/20/2023, 1:34 PMchristophsturm
03/20/2023, 4:17 PMprivate val operatingSystemMXBean =
ManagementFactory.getOperatingSystemMXBean() as com.sun.management.OperatingSystemMXBean
private val runtimeMXBean = ManagementFactory.getRuntimeMXBean()
val uptime = runtimeMXBean.uptime
val cpuTime = operatingSystemMXBean.processCpuTime / 1000000
val percentage = cpuTime * 100 / uptime
if you run that at the end of your suite you will see how much load you generated. optimal percentage would be 100*cpus, but thats more a theoretical value.nacyolsa
03/21/2023, 3:24 PMparallelism=1
parallelism=16
christophsturm
03/21/2023, 3:44 PMdo you run it after each spec or after entire project?this displays a summary of cpu load over the whole test suite so I run it after the entire project.
nacyolsa
03/21/2023, 3:50 PMthis displays a summary of cpu load over the whole test suite so I run it after the entire project.I run it after entire project and it shows around 1800 with
parallelism=16
. With parallelism=1
value is similar.christophsturm
03/21/2023, 3:51 PMnacyolsa
03/21/2023, 3:56 PM