Exemple #1
0
        public void WriteRow(string typeName, string version, Scenario scenario, int iterations, TimeSpan elapsedTime)
        {
            if (typeName == null)
                throw new ArgumentNullException("typeName");

            if (version == null)
                throw new ArgumentNullException("version");

            if (scenario == null)
                throw new ArgumentNullException("scenario");

            var totalMilliseconds = elapsedTime.TotalMilliseconds;
            var averageMicroseconds = (totalMilliseconds*1000)/iterations;
            var line = String.Format(CultureInfo.InvariantCulture, "\"{0}\";\"{1}\";\"{2}\";\"{3}\";{4};{5:0.000};{6:0.000};{7:0.000}",
                typeName,
                version,
                scenario.Name,
                scenario.Description,
                iterations,
                totalMilliseconds,
                averageMicroseconds/1000,
                averageMicroseconds);

            _writer.WriteLine(line);
        }
Exemple #2
0
        public void Write(AssemblyName assemblyName, Scenario scenario, int iterations, TimeSpan elapsedTime)
        {
            if (assemblyName == null)
                throw new ArgumentNullException("assemblyName");

            var version = String.Format("v {0}.{1}", assemblyName.Version.Major, assemblyName.Version.Minor);

            Write(assemblyName.Name, version, scenario, iterations, elapsedTime);
        }
Exemple #3
0
        public void WriteRow(string typeName, string version, Scenario scenario, int iterations, TimeSpan elapsedTime)
        {
            if (typeName == null)
                throw new ArgumentNullException("typeName");

            if (version == null)
                throw new ArgumentNullException("version");

            if (scenario == null)
                throw new ArgumentNullException("scenario");

            var totalMilliseconds = elapsedTime.TotalMilliseconds;
            var averageMicroseconds = (totalMilliseconds*1000)/iterations;
            var line = String.Format(CultureInfo.InvariantCulture, "|{0,-11}|{1,9}|{2,-38}|{3,12}|{4,18:0.000}|{5,20:0.000}|",
                typeName,
                version,
                scenario.Description,
                iterations,
                totalMilliseconds,
                averageMicroseconds);

            _writer.WriteLine(line);
        }
Exemple #4
0
 public void Write(string typeName, string version, Scenario scenario, int iterations, TimeSpan elapsedTime)
 {
     _writer.Value.WriteRow(typeName, version, scenario, iterations, elapsedTime);
 }
Exemple #5
0
 public void WriteRow(string typeName, string version, Scenario scenario, int iterations, TimeSpan elapsedTime)
 {
     ForEachWriter(w => w.WriteRow(typeName, version, scenario, iterations, elapsedTime));
 }