From: John W. L. <Joh...@sa...> - 2011-01-21 16:50:56
|
I'm not sure. Let me explain the details. When a new line or condition is covered, Cobertura will store the new count in memory. As more and more lines/conditions are covered, the number of counts grows. If a line/condition is run again, the count will be incremented, but this should not increase the memory. When you flush the counts, the existing cobertura.ser file is read into memory. The counts of the file are then merged with the collected counts since the last flush. After the flush, all the counter's memory should be available for garbage collection unless we are holding onto a reference (we should not be). In any case, I don't believe the memory that is needed should be over two times the size of the cobertura.ser file at any given moment. How big is the cobertura.ser file that is created by the instrumentation? The size of the cobertura.ser file increases with the number of class files that are instrumented. It might give some clues if you instrument subsets. If you get an out-of-memory exception with a stack trace, that may explain what is causing the overrun. Please send that. John -----Original Message----- From: Steven Christou [mailto:ste...@re...] Sent: Friday, January 21, 2011 11:30 AM To: John W. Lewis Cc: 'cob...@li...' Subject: Re: [Cobertura-devel] Cobertura Limits We changed our code recently to include the ability to flush cobertura data in our JVM at any point using the suggested code in the FAQ page. Is this going to help remove this memory limit? We set our heap space to -Xmx1400m which I believe is really high, and it did not solve the issue with memory. On 1/11/2011 5:07 PM, John W. Lewis wrote: > There is a memory limit. All of the line and conditional counts are kept in memory till the JVM is shut down and they are flushed to disk. > > So, as more instrumented code is executed in the test process, the more memory is used by the test process. > > Then, when the shutdown occurs, the cobertura.ser file is loaded into memory, and the in-memory counts are merged before being written to the disk again. > > John > > > -----Original Message----- > From: Steven Christou [mailto:ste...@re...] > Sent: Tuesday, January 11, 2011 5:48 PM > To: 'cob...@li...' > Subject: [Cobertura-devel] Cobertura Limits > > I was wondering if cobertura had any kind of limits. I ran into an issue where I believe something was happening and the server was starting to crash. The JVM never shut down, but at the same time, when running fitnesse tests, I was getting nothing but failures. I could run all my tests uninstrumented, and they would all pass. This happens after I run several hundred tests though, so I'm assuming I must be hitting a limit. > > I tried running with Piotr's changes, but I am running into an issue where the tests do not even run. > Email Disclaimer: > http://www.redprairie.com/emaildisclaimer/ > > > ---------------------------------------------------------------------- > -------- Protect Your Site and Customers from Malware Attacks Learn > about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how > you can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > Email Disclaimer: http://www.redprairie.com/emaildisclaimer/ |