Permalink
Browse files

Include some statistics in the results

  • Loading branch information...
1 parent ad8de41 commit ad6a7bff84c09d53c6422147b9ab0c6c06012c86 @tadzik committed Apr 30, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 smoker
View
15 smoker
@@ -33,6 +33,8 @@ sub MAIN ($projectsfile) {
my %log;
+ my $start = time;
+
for $panda.ecosystem.project-list -> $p {
my $x = $panda.ecosystem.get-project($p);
# don't waste time if it has already been installed once
@@ -44,11 +46,24 @@ sub MAIN ($projectsfile) {
%log{$p} = gen-result($! // 'chocolate cake');
}
+ my $end = time;
+
+ %log<_statistics> = {
+ runtime => $end - $start,
+ compiler => $*PERL<compiler><name>,
+ version => $*PERL<compiler><ver>,
+ datetime => DateTime.new(now).Str
+ }
+
shell 'rm -rf masstest/';
shell 'rm -rf installlib/';
given open('results.json', :w) {
.say: to-json %log;
.close;
}
+
+ say '';
+ say 'Smoke test results have been written to results.json';
+ say '====================================================';
}

0 comments on commit ad6a7bf

Please sign in to comment.