Class FibonacciTaskTest
java.lang.Object
topics.parallel.fibonacci.FibonacciTaskTest
Validation Suite for Parallel Fibonacci
Demonstrates the structural speedup achieved by leveraging the Fork/Join pool compared to the purely sequential execution. Benchmarks execution using the modern Java Time API.
- Author:
- vicegd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidsetup()Initializes the testing context and provisions the concurrent thread pool.(package private) voidScenario: Parallel execution for N=50.(package private) voidScenario: Parallel execution for N=30.(package private) static voidteardown()Gracefully shuts down the thread pool, releasing OS resources.
-
Constructor Details
-
FibonacciTaskTest
FibonacciTaskTest()
-
-
Method Details
-
setup
@BeforeAll static void setup()Initializes the testing context and provisions the concurrent thread pool. -
teardown
@AfterAll static void teardown()Gracefully shuts down the thread pool, releasing OS resources. -
shouldComputeFibonacciForModerateSizeInParallel
@Test void shouldComputeFibonacciForModerateSizeInParallel()Scenario: Parallel execution for N=30.
-
shouldComputeFibonacciForLargeSizeInParallel
@Test void shouldComputeFibonacciForLargeSizeInParallel()Scenario: Parallel execution for N=50.
Purpose: Demonstrates the hardware utilization and speedup across multiple cores compared to the sequential bottleneck.
-