/[xmltv_parser]/trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs
ViewVC logotype

Diff of /trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs

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

--- trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs	2013/03/16 19:56:47	189
+++ trunk/GBPVRProgramDatabaseFixer/SQLLITE.cs	2013/03/16 19:59:44	190
@@ -816,7 +816,7 @@
         }
 
         public void RemoveOldGBPVRPrograms(List<SQLLITE.IPROGRAMME> programs)
-        {
+        {            
             gLog.Info.WriteLine("Removing all gbpvr programs.");
             //double total = programs.Count;
             //double index = 0;
@@ -831,10 +831,14 @@
             //    }
             //    index++;
             //}
-              if (!RemoveAllProgramDatabaseEntries())
-              {
-                  gLog.Error.WriteLine("Failed to remove one or more program entries");
-              }
+            Stopwatch st = new Stopwatch();
+            st.Start();
+            if (!RemoveAllProgramDatabaseEntries())
+            {
+                gLog.Error.WriteLine("Failed to remove one or more program(s)");
+            }
+            st.Stop();
+            gLog.Warn.WriteLine("    operation took: {0} seconds", st.Elapsed.TotalSeconds);
         }
         public void UpdateGBPVRPrograms(List<IOldNewProgram> programs)
         {
@@ -849,11 +853,15 @@
             }
             new_program_list.TrimExcess();
             gLog.Info.WriteLine("Inserting {0} gbpvr programs.", new_program_list.Count);
+            Stopwatch st = new Stopwatch();
+            st.Start();
             if (!InsertProgramEntryDatabase(new_program_list))
             {
-                gLog.Error.WriteLine("Failed to insert program(s)");
+                gLog.Error.WriteLine("Failed to insert one or more program(s)");
             }
             //string command = BuildGBPVRMultiInsertCommand(new_program_list);
+            st.Stop();
+            gLog.Warn.WriteLine("    operation took: {0} seconds", st.Elapsed.TotalSeconds);
         }
 
         private bool RemoveAllProgramDatabaseEntries()

 

  ViewVC Help
Powered by ViewVC 1.1.22