Re: org.prevayler.implementation.PersistenceTest#testDiskSyncPerformance
Klaus Wuestefeld <[email protected]> Tue, 30 Oct 2012 21:39:50 -0200
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <CAMAooZGXOfhWpCWry++kt5K8ja__JXESZHKgU3FScyuiCgGFow@mail.gmail.com> |
> This test fails now and then. I would very much like to fix it but don't > understand what it's supposed to do. Can someone please help me out? It is supposed to test that forcing sync to disk should be slower than letting the O.S. buffer things. A few things might make the test stop failing: - Use System.nanotime() instead of currentTimeMillis() in lines 106 and 112 to get finer granularity. - Call system.gc() before line 103 to avoid one run influencing the other. Are you sure FD.sync() actually does something on your platform? Is the HD cache disabled? Klaus ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion _______________________________________________ "Databases in Memoriam" -- http://www.prevayler.org