コード例 #1
0
        public void AddResult(FileIterationConfig config, string target, int foldercount, int fileCount, TimeSpan createTime, TimeSpan readTime, TimeSpan deleteTime)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            // Add a result line
            string result = $"{DateTime.UtcNow:s}, \"{target}\", {config.FileSize}, {config.FolderDepth}" +
                            $", {config.FoldersPerFolder}, {config.FilesPerFolder}, {foldercount}, {fileCount}, {createTime.TotalSeconds}, {readTime.TotalSeconds}, {deleteTime.TotalSeconds}";

            File.AppendAllText(FileName, result + Environment.NewLine);
        }
コード例 #2
0
        public void AddFailedResult(FileIterationConfig config, string target)
        {
            if (config == null)
            {
                throw new ArgumentNullException(nameof(config));
            }

            // Add a result line
            string result = $"{DateTime.UtcNow:s}, \"{target}\", {config.FileSize}, {config.FolderDepth}" +
                            $", {config.FoldersPerFolder}, {config.FilesPerFolder}, 0, 0, 0.0, 0.0, 0.0";

            File.AppendAllText(FileName, result + Environment.NewLine);
        }
コード例 #3
0
 public Config()
 {
     DiskSpeedTest     = new DiskSpeedConfig();
     FileIterationTest = new FileIterationConfig();
 }
コード例 #4
0
 public FileIterationTest(FileIterationConfig config)
 {
     Config = config;
 }