Class ExecutionSynchronizer
java.lang.Object
io.trino.benchto.driver.execution.ExecutionSynchronizer
This class is responsible for synchronizing threads in driver if graphite metrics collection
is enabled. Graphite collects metrics with predefined resolution, ex. 10 s.
After query/benchmark is finished we should wait at least 2 resolutions before we execute next query/benchmark, so runs does not interfere with each other.
Graphite metrics loading should be delayed at least 1 resolution to make sure that last probe was stored in graphite.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidIf metrics collection is enabled and we are doing concurrent benchmark, we should wait between benchmarks, so measurements are accurate.voidawaitAfterQueryExecutionAndBeforeResultReport(QueryExecutionResult queryExecutionResult) If metrics collection is enabled and we are doing serial benchmark, we should wait between queries, so measurements are accurate.<T> CompletableFuture<T>Executescallablewhen time comes.voidshutdown()
-
Constructor Details
-
ExecutionSynchronizer
public ExecutionSynchronizer()
-
-
Method Details
-
shutdown
- Throws:
InterruptedException
-
awaitAfterQueryExecutionAndBeforeResultReport
public void awaitAfterQueryExecutionAndBeforeResultReport(QueryExecutionResult queryExecutionResult) If metrics collection is enabled and we are doing serial benchmark, we should wait between queries, so measurements are accurate. -
awaitAfterBenchmarkExecutionAndBeforeResultReport
If metrics collection is enabled and we are doing concurrent benchmark, we should wait between benchmarks, so measurements are accurate. -
execute
Executescallablewhen time comes. Thecallablegets executed immediately, without offloading to a backghround thread, if execution time requested has already passed.
-