Send statistics at program end, not start.

This commit is contained in:
2020-07-12 14:53:18 +01:00
parent 548d3ebf81
commit 9d54545f72
2 changed files with 15 additions and 3 deletions

View File

@@ -16,6 +16,16 @@
<e p="$USER_HOME$/.nuget/packages/nunit3testadapter/3.15.1/build/netcoreapp2.0/nunit.engine.api.dll" t="Include" />
<e p="$USER_HOME$/.nuget/packages/nunit3testadapter/3.15.1/build/netcoreapp2.0/nunit.engine.dll" t="Include" />
<e p="$PROJECT_DIR$" t="IncludeFlat">
<e p=".git/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.Checksums/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.CommonTypes/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.Console/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.Decoders/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.Dto/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/Aaru.Helpers/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/CICMMetadata/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/cuetools.net/info/exclude" t="IncludeRecursive" />
<e p=".git/modules/cuetoolsnet/info/exclude" t="IncludeRecursive" />
<e p=".github/CODE_OF_CONDUCT.md" t="Include" />
<e p=".github/ISSUE_TEMPLATE.md" t="Include" />
<e p=".github/PULL_REQUEST_TEMPLATE.md" t="Include" />

View File

@@ -154,8 +154,6 @@ namespace Aaru
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
Statistics.SaveStats();
var rootCommand = new RootCommand
{
new Option(new[]
@@ -189,7 +187,11 @@ namespace Aaru
rootCommand.AddCommand(new ListNamespacesCommand());
rootCommand.AddCommand(new RemoteCommand());
return rootCommand.Invoke(args);
int ret = rootCommand.Invoke(args);
Statistics.SaveStats();
return ret;
}
internal static void PrintCopyright()