Parrot Embed Grant Update #2

| | Comments (1) | TrackBacks (0)

I have slowly but surely been increasing test coverage of src/extend_vtable.c, which when I started my grant was at 5% and is now sitting at 43%. I estimated that it would take about two weeks to get it to 50% and then another two weeks to get to 95%, but this was a bit optimistic. When I look back, giving myself a month for each would have been appropriate.

I do believe that my development velocity has increased recently, because I wrote a convenience funciton called extend_vtable_output_is(), which greatly reduces the number of lines of code that each extend_vtable test requires. The function is basically a wrapper around already existing functions that automates the process of compiling C source code use the Parrot C API, but it removes the need for roughly 40 lines of boilerplate stuff, such as including the proper header files, defining convenience functions that do basic error checking and data structure creation.

The whole reason this subsystem is undertested is because no function like extend_vtable_output_is() existed. Now each of my extend_vtable tests is around 10 lines, instead of 50. I've only had the new function for about half the time of the grant, so tests are now getting written much faster.

I have added about 700 lines of lines of tests since this grant started (using the spiffy new extend_vtable_output_is() function), and that has caused a 38% increase in test coverage. With the power of mathematics, we can figure out that (.38)*N = 700, which means N = 700/.38 = ~1842, where N is the number of lines of tests needed to cover 100% of the file (roughly).

My new estimate for getting to 95% coverage of extend_vtable is one month from now, Feb 24th, and then another two months for the rest of the grant.

The reason I say two months is that I am actually trying to hit a moving target, and the code coverage of extend.c and embed.c have actually *gone down* since I started the grant. Currently extend.c is about 6% lower and embed.c is about 14% lower. This means my grant is actually getting harder to complete.

I also learned about a very useful yet undocument environment variable called POSTMORTEM which makes Parrot test functions leave various intermediate files around for debugging purposes if it is set to true, which greatly helps in developing these tests. I plan to add documentation about this to the Parrot developer documentation.

Given the new test function and the new coverage numbers, I estimate that I will be able to complete this grant by late April 2011.

0 TrackBacks

Listed below are links to blogs that reference this entry: Parrot Embed Grant Update #2.

TrackBack URL for this entry: http://leto.net/mt/mt-tb.cgi/193

1 Comments

I've got the strange impression that there is a repetition somewhere :)
I've got the strange impression that there is a repetition somewhere :)
I've got the strange impression that there is a repetition somewhere :)

About this Entry

This page contains a single entry by Jonathan Leto published on January 24, 2011 12:53 AM.

Parrot Embed Grant Update #1 was the previous entry in this blog.

Parrot Embed Grant Update #3 : Now with Dragons is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Clicky Web Analytics 42