Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences in Performance Test Results #568

Open
darionyaphet opened this issue Dec 26, 2024 · 0 comments
Open

Differences in Performance Test Results #568

darionyaphet opened this issue Dec 26, 2024 · 0 comments

Comments

@darionyaphet
Copy link

I did a simple test to test the data reading performance, but the results were not as good as advertised. Is my testing method incorrect? What configuration items were missed?

        try (ChronicleMap<Integer, NewsDetail> map = ChronicleMap
                .of(Integer.class, NewsDetail.class)
                .name("example")
                .averageValue(detail)
                .entries(1000000L)
                .create()) {

            for (int i = 0; i < 10000; i++) {
                map.put(i, detail);
            }

            for (int i = 0; i < 10000; i++) {
                map.getUsing(i, detail);
            }

            long start = System.currentTimeMillis();
            for (int i = 0; i < 2000; i++) {
                map.getUsing(i, detail);
            }
            System.out.println("duration: " + (System.currentTimeMillis() - start) + "ms");
        }
duration: 171 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant