Your GAA club’s booking app works with ten bookings. What happens after a year?
You’ve built a pitch booking app for your GAA club. Finding a booking feels instant when there are only ten. After a busy year, the club has ten thousand bookings. Would you still recommend the app if finding a booking now takes much longer?
Start with the checks you’d run on any booking app. A unit test checks one small piece, such as whether the date checker rejects the thirtieth of February. A function test checks whether the lookup feature finds the expected booking. A system test checks that you can book, restart the app and find your booking.
Repeat the same lookup on each test history and record the median, the middle time when you put the runs in order. Both histories return the right booking. In this example, the median rises from forty to four hundred and eighty milliseconds, above the club’s three hundred millisecond limit.
You have a search that returns the right booking in a small test. Which test would give you the best evidence about whether the search will slow down after a year? Pick one option.
The large test database takes up twenty-four megabytes. Record that so you can compare storage after a change. Now inspect what the app keeps. Contact details are still there one hundred and twenty days after the event. That exceeds the club’s ninety-day limit and leaves personal details exposed for longer than needed.
The slow lookup scans records. This SQL adds an index on the booking reference so the database can find a match more directly. Rerun the original tests at both sizes on the same machine, with the same data and searches. Check correctness, repeat the timings in the same way and measure storage again.
The app still returns the expected booking at both sizes. With ten bookings, the median stays at forty milliseconds. With ten thousand, subtract one hundred and eighty from four hundred and eighty to save three hundred milliseconds. The new median meets the limit. Storage rises from twenty-four to thirty megabytes, six extra megabytes.
A different revision cuts the median search time from five hundred to three hundred and twenty milliseconds. Storage rises from twenty-five to twenty-nine megabytes. The target is still three hundred milliseconds or less. Which judgement is supported by those results? Pick one.
Faster lookup leaves contact details untouched, so add a scheduled cleanup. The first version uses greater than ninety and skips bookings on day ninety. Change it to greater than or equal to ninety. After cleanup runs on made-up bookings, check that day eighty-nine keeps its details and day ninety loses them.
If an exam question asks you to evaluate the solution and justify a refinement, give a measured limitation. The original search took four hundred and eighty milliseconds against a target of three hundred. Recommend the index because the retest reached one hundred and eighty milliseconds, and acknowledge the six extra megabytes.