Mittwoch, 6. Oktober 2010

Enhancing Unit Tests for Performance Monitoring #1

Hey folks,

in the past several weeks I've eagerly tested Intel's Parallel Studio. I got my hands on the beta release and tested it against some common parallel problems and I went on working on the parallelization only in September. Since then though, I have been developing an approach combining software patterns with unit tests I'd like to share with you. In the next weeks I'll be coming up with further performance aspects.


Our research works in this field show that parallel applications can basically be seen as sequential code with parallel regions of code embedded in between. I might be using the metaphor of a "pearl necklace" now and then, because I like the idea that the pearls are arranged one after another and that they are the precious spots that harbor parallel potential.

Recently, some quality work has been done around unit tests, that attracted my attention. I'm currently working on a test-based way to detect parallelization potential in sequential applications. Now, everybody that is familiar with that topic knows that unit test frameworks don't support this out-of-the-box, so we're just about to enhance it ourselves. The new thing about our approach is that unit tests can then not only assert Boolean conditions for fields or return-types. Assertions can then also account for memory consumption, cache-evicts or other counters that might not be uninteresting to those dealing with parallelization. As the test runs repeatedly execute alongside the development process, our approach can also be used to monitor performance changes that occur in the course of code refactoring.

So now you can more easily focus on the essentials - the pearls - and leave the rest out.

K!

Keine Kommentare:

Kommentar veröffentlichen