Added some stopwatches for disk scanning

This commit is contained in:
Mark McDowall 2014-03-25 16:25:45 -07:00
parent 30788a45e1
commit a0aaac0fd9
1 changed files with 9 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using System.IO;
using System.Diagnostics;
using System.IO;
using System.Linq;
using NLog;
using NzbDrone.Common.Disk;
@ -74,9 +75,16 @@ namespace NzbDrone.Core.MediaFiles
return;
}
var videoFilesStopwatch = Stopwatch.StartNew();
var mediaFileList = GetVideoFiles(series.Path).ToList();
videoFilesStopwatch.Stop();
_logger.Trace("Finished getting episode files for: {0} [{1}]", series, videoFilesStopwatch.Elapsed);
var decisionsStopwatch = Stopwatch.StartNew();
var decisions = _importDecisionMaker.GetImportDecisions(mediaFileList, series, false);
decisionsStopwatch.Stop();
_logger.Trace("Import decisions complete for: {0} [{1}]", series, decisionsStopwatch.Elapsed);
_importApprovedEpisodes.Import(decisions);
_logger.Info("Completed scanning disk for {0}", series.Title);