Overview
A Java Swing application that measures the real execution time of four reference growth orders on the JVM, plots the curves live, and checks a fitted prediction against a fresh measurement.
Four synthetic workloads are written so that their cost matches a known order of growth (linear, linearithmic, quadratic and quadratic-logarithmic), and each is timed over a series of input sizes. Every workload runs on its own thread and times itself, so the plot is drawn from measurements rather than from the theory it is supposed to illustrate.
The check at the end is the point: a curve is fitted to what was measured, asked for a size it has never run, and then that size is actually run. Theory that cannot predict the next measurement is not worth much.
Project 1 of 7 for the Advanced Algorithms course at the Universitat de les Illes Balears, and the foundation of the rest: the MVC skeleton, the event protocol and the benchmarking style that every later practice reuses were fixed here.
javabenchmarkingalgorithm-analysis