@@ -25,7 +25,7 @@ public partial class MainWindow : MetroWindow
2525 {
2626 private readonly int NUM_THREADS , MAX_THREADS ;
2727
28- // Interval (in ms) for coverage info list.
28+ // Update interval (in ms) for coverage info list.
2929 private const int UPDATE_INTERVAL = 200 ;
3030
3131 private MemTest [ ] memtests ;
@@ -42,7 +42,7 @@ public MainWindow()
4242 NUM_THREADS = Convert . ToInt32 ( Environment . GetEnvironmentVariable ( "NUMBER_OF_PROCESSORS" ) ) ;
4343 MAX_THREADS = NUM_THREADS * 4 ;
4444 memtests = new MemTest [ MAX_THREADS ] ;
45- // index 0 stores the total
45+ // Index 0 stores the total.
4646 memtestInfo = new MemTestInfo [ MAX_THREADS + 1 ] ;
4747
4848 InitCboThreads ( ) ;
@@ -71,8 +71,7 @@ public MainWindow()
7171 while ( IsAnyMemTestStopping ( ) )
7272 Thread . Sleep ( 100 ) ;
7373
74- // TODO: figure out why total coverage is sometimes
75- // reporting 0.0 after stopping
74+ // TODO: Figure out why total coverage is sometimes reporting 0.0 after stopping.
7675 UpdateCoverageInfo ( false ) ;
7776 } ) ;
7877
@@ -378,8 +377,8 @@ private void InitLstCoverage()
378377 {
379378 for ( var i = 0 ; i <= ( int ) cboThreads . SelectedItem ; i ++ )
380379 {
381- // First row is total .
382- memtestInfo [ i ] = new MemTestInfo ( i == 0 ? "T " : i . ToString ( ) , 0.0 , 0 ) ;
380+ // First row is average coverage .
381+ memtestInfo [ i ] = new MemTestInfo ( i == 0 ? "A " : i . ToString ( ) , 0.0 , 0 ) ;
383382 }
384383
385384 lstCoverage . ItemsSource = memtestInfo ;
@@ -773,7 +772,7 @@ private void UpdateCoverageInfo(bool shouldCheck = true)
773772 lock ( memtestInfo )
774773 {
775774 // Update the total coverage and errors.
776- memtestInfo [ 0 ] . Coverage = totalCoverage ;
775+ memtestInfo [ 0 ] . Coverage = totalCoverage / threads ;
777776 memtestInfo [ 0 ] . Errors = totalErrors ;
778777 }
779778
0 commit comments