From 263cc5c6d7ea7b1a0be02ed68b7df5965d0d534a Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Wed, 20 Nov 2024 04:40:33 +0800 Subject: [PATCH] Print the number of processors and add a comment in `multiThreadMultiConnectionEach10KLocalTransactions` --- .../huanshankeji/exposed/benchmark/TransactionBenchmark.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/integrated/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/TransactionBenchmark.kt b/integrated/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/TransactionBenchmark.kt index 928295c..e2183c0 100644 --- a/integrated/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/TransactionBenchmark.kt +++ b/integrated/src/benchmarks/kotlin/com/huanshankeji/exposed/benchmark/TransactionBenchmark.kt @@ -57,7 +57,10 @@ class TransactionBenchmark : WithContainerizedDatabaseBenchmark() { @Benchmark fun multiThreadMultiConnectionEach10KLocalTransactions() { - List(Runtime.getRuntime().availableProcessors()) { + // Note that on a device with heterogeneous architecture some threads may finish earlier than others. + List(Runtime.getRuntime().availableProcessors().also { + println("Number of processors: $it") + }) { thread { val database = databaseConnect() repeat(`10K`) { transaction(database) {} }