/[RomCheater]/trunk/RomCheater/Docking/FloatingMemorySearcher.cs
ViewVC logotype

Diff of /trunk/RomCheater/Docking/FloatingMemorySearcher.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/19 12:47:26	389
+++ trunk/RomCheater/Docking/FloatingMemorySearcher.cs	2012/06/20 10:03:25	392
@@ -1004,6 +1004,11 @@
         {
             Stopwatch st = new Stopwatch();
             st.Start();
+
+            Stopwatch st_first_search = new Stopwatch();
+            Stopwatch st_nonrange_search = new Stopwatch();
+            Stopwatch st_ranged_search = new Stopwatch();
+
             e.Result = st;
             //List<ResultType<object>> tmp_Results = new List<ResultType<object>>();
             List<ResultType<object>> second_tmp_Results = new List<ResultType<object>>();
@@ -1033,6 +1038,7 @@
             #region First Search
             if (SearchArgs.IsFirstSearch)
             {
+                st_first_search.Start();
                 SearchArgs.Results.Clear();
                 //r_ms.BaseStream.Seek(0, SeekOrigin.Begin);
                 for (uint i = 0; i < buffered_mem.Length; i += STEP_SIZE)
@@ -1074,7 +1080,8 @@
                 resultsprogress.Value = 100;
                 resultsprogress.Message = "";
                 //Application.DoEvents();
-
+                st_first_search.Stop();
+                logger.Profiler.WriteLine("First search took a total of {0} seconds to complete.", st_first_search.Elapsed.TotalSeconds);
             }
             #endregion
 
@@ -1097,6 +1104,7 @@
                 if (SearchArgs.CompareType != SearchCompareTypes.Between && SearchArgs.CompareType != SearchCompareTypes.NotBetween)
                 {
                     #region Non-Range Searches
+                    st_nonrange_search.Start();
                     //second_tmp_Results = new List<ResultType<object>>(SearchArgs.Results.Count * 1024);
                     ////second_tmp_Results.c
                     for (int i = 0; i < SearchArgs.Results.Count; i += 1)
@@ -1337,12 +1345,15 @@
                         }
 
                     }
+                    st_nonrange_search.Stop();
+                    logger.Profiler.WriteLine("Non-Ranged search took a total of {0} seconds to complete.", st_nonrange_search.Elapsed.TotalSeconds);
                     #endregion
                 }
                 #region Ranged Searches
 #if !DONOT_HAVE_RANGED_SEARCH_SUPPORT
                 if (SearchArgs.CompareType == SearchCompareTypes.Between || SearchArgs.CompareType == SearchCompareTypes.NotBetween)
                 {
+                    st_ranged_search.Start();
                     object start, end;
 
                     start = SearchArgs.CompareStartValue;
@@ -1386,6 +1397,8 @@
                             //Application.DoEvents();
                         }
                     }
+                    st_ranged_search.Stop();
+                    logger.Profiler.WriteLine("Ranged search took a total of {0} seconds to complete.", st_ranged_search.Elapsed.TotalSeconds);
                 }
 #endif
                 #endregion
@@ -1419,7 +1432,7 @@
             {
                 Stopwatch st = (e.Result as Stopwatch);
                 st.Stop();
-                logger.Debug.WriteLine("Search took a total of {0} seconds", st.Elapsed.TotalSeconds);
+                logger.Profiler.WriteLine("Search took {0} seconds, overall, to complete.", st.Elapsed.TotalSeconds);
             }
             
             resultsprogress.Value = 100;

 

  ViewVC Help
Powered by ViewVC 1.1.22