@Test
    void testCachedMultiThreadedPerformance() throws InterruptedException { //NOSONAR: Do not complain about ignored performance test
        UserAgentAnalyzer uaa =
            UserAgentAnalyzer.newBuilder()
                .immediateInitialization()
                .keepTests()
                .build();

        // This testcase does not occur in the rest of the testcases (manually manipulated version for the Chrome part).
        String cachedUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.1.2.3.4.5.6 Safari/537.36";
        List<TestCase> testCases = uaa.getTestCases();
        // Make sure it is not in there.
        assertEquals(0, testCases.stream().filter(testCase -> testCase.getUserAgent().equals(cachedUserAgent)).count());

        long totalIterations = 0;
        long totalNanosUsed = 0;

        for (int i = 0; i < 10; i++) {
            LOG.info("Iteration {} : Start", i);

            FireAllTestCases  fireTests      = new FireAllTestCases(uaa, testCases);
            List<RunCachedTestCase> cachedTestCases = Arrays.asList(
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000),
                    new RunCachedTestCase(uaa, cachedUserAgent, 10_000_000)
                );
            // Wipe the cache for the new run.
            uaa.clearCache();

            // Now parse and cache the precached useragent.
            uaa.parse(cachedUserAgent);

            // Start both
            fireTests.start();
            cachedTestCases.forEach(Thread::start);

            // Wait for both to finish
            fireTests.join();
            for (RunCachedTestCase ctc : cachedTestCases) {
                ctc.join();
            }

            for (RunCachedTestCase cachedTestCase : cachedTestCases) {
                long iterations = cachedTestCase.getIterations();
                long nanosUsed = cachedTestCase.getNanosUsed();
                LOG.info("Iteration {} : Took {}ns ({}ms) = {}ns each", i, nanosUsed, (nanosUsed) / 1_000_000L, nanosUsed/iterations);
            }

        }

        LOG.info("Average    : {}ns ({}ms) = {}ns each", totalNanosUsed, (totalNanosUsed) / 1_000_000L, totalNanosUsed/totalIterations);
    }
This test is intended to see if there is a performance difference for cached hits
if there are a lot of uncached hits also.
analyzer/src/test/java/nl/basjes/parse/useragent/profile/TestConcurrentPerformance.java