The example application is a great way to explore the capabilities of Performance Validator.
The source and projects are included in the installation, but you'll need to build the example application yourself.
You can then use nativeExample.exe in conjunction with Performance Validator to monitor the performance of the application as you use it.
The best way to understand how Performance Validator works is by example.
We recommend launching the example application from Performance Validator and observing how the menu actions affect performance statistics and hotspots.
Examining the source code is the best way to see what's going on in the example application.
Resetting the statistics before and between using the menu items is a good way to easily see exactly what new code was marked as being time consuming.
The example runs some inline tests and some sorting methods. For convenience, below we have provided the source locations where each menu action runs a test.
Most test locations are in the CMainFrame class of nativeExample\mainfrm.cpp
File menu ...
Test inline classes |
OnFileTestinlineclasses() Calls a small number of in-lined functions in a tight loop. See the comment in this function for details about in-line functions and the data collection mode. |
Exit |
closes the example application |
All the sorting routines populate an array with a certain number of items and then validate the result after sorting the array.
Sort menu ...
Quick Sort |
OnSortQuicksort() sorts an array using qsort |
Comb Sort |
OnSortCombsort() sorts an array using doCombSort |
Heap Sort |
OnSortHeapsort() sorts an array using heapSort |
Merge Sort |
OnSortMergesort() sorts an array using mergeSort_sortCore |
Bubble Sort |
OnSortBubblesort() sorts an array using quite an inefficient algorithm |
Choose how many items to sort... |
OnSortChoosehowmanyitemstosort() sets the number of items being sorted by each of the above methods |
Help menu ...
About nativeExample... |
CPvExampleApp::OnAppAbout() Shows a simple information dialog using code in nativeExample.cpp |