Author: spouliot
Date: 2008-02-16 19:56:29 -0500 (Sat, 16 Feb 2008)
New Revision: 95947
Modified:
trunk/mono-tools/gendarme/console/ChangeLog
trunk/mono-tools/gendarme/console/ConsoleRunner.cs
Log:
2008-02-16 Sebastien Pouliot <[EMAIL PROTECTED]>
* ConsoleRunner.cs: Handle no arguments. Show correct timing for
each assembly being processed.
Modified: trunk/mono-tools/gendarme/console/ChangeLog
===================================================================
--- trunk/mono-tools/gendarme/console/ChangeLog 2008-02-17 00:55:10 UTC (rev
95946)
+++ trunk/mono-tools/gendarme/console/ChangeLog 2008-02-17 00:56:29 UTC (rev
95947)
@@ -1,5 +1,7 @@
-2008-02-16 Sebastien Pouliot <[EMAIL PROTECTED]>
+2008-02-16 Sebastien Pouliot <[EMAIL PROTECTED]>
+ * ConsoleRunner.cs: Handle no arguments. Show correct timing for
+ each assembly being processed.
* XmlResultWriter.cs: Call Dispose (not Close).
2008-02-15 Sebastien Pouliot <[EMAIL PROTECTED]>
Modified: trunk/mono-tools/gendarme/console/ConsoleRunner.cs
===================================================================
--- trunk/mono-tools/gendarme/console/ConsoleRunner.cs 2008-02-17 00:55:10 UTC
(rev 95946)
+++ trunk/mono-tools/gendarme/console/ConsoleRunner.cs 2008-02-17 00:56:29 UTC
(rev 95947)
@@ -213,10 +213,8 @@
{
try {
int result = Parse (args);
- if (result != 0) {
- if (help) {
- Help ();
- }
+ if ((result != 0) || help) {
+ Help ();
return result;
}
@@ -249,21 +247,27 @@
}
}
+ private DateTime timer = DateTime.MinValue;
+
public override void Run ()
{
DateTime start = DateTime.UtcNow;
base.Run ();
+ DateTime end = DateTime.UtcNow;
+ Console.WriteLine (": {0} seconds.", (end -
timer).TotalSeconds);
+ Console.WriteLine ();
Console.WriteLine ("{0}{1} assemblies processed in {2}
seconds.{0}",
Environment.NewLine, Assemblies.Count,
(DateTime.UtcNow - start).TotalSeconds);
}
protected override void OnAssembly (RunnerEventArgs e)
{
- DateTime start = DateTime.UtcNow;
+ if (timer != DateTime.MinValue)
+ Console.WriteLine (": {0} seconds.",
(DateTime.UtcNow - timer).TotalSeconds);
+ // next assembly
+ Console.Write ((e.CurrentAssembly as
IAnnotationProvider).Annotations ["filename"]);
+ timer = DateTime.UtcNow;
base.OnAssembly (e);
- Console.WriteLine ("{0}: {1} seconds.",
- (e.CurrentAssembly as
IAnnotationProvider).Annotations ["filename"],
- (DateTime.UtcNow - start).TotalSeconds);
}
void Header ()
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches