Skip to content

Commit

Permalink
Fix spec:profiler.
Browse files Browse the repository at this point in the history
* Default "first" item is "true" in ProfilePrinter.
* Bad rspec syntax.
  • Loading branch information
headius committed Mar 11, 2015
1 parent 70432b8 commit f1eab90
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -67,8 +67,6 @@ matrix:
- env: COMMAND=tool/truffle-findbugs.sh
jdk: oraclejdk8
fast_finish: true
allow_failures:
- env: PHASE='-Prake -Dtask=spec:profiler'

branches:
only:
Expand Down
Expand Up @@ -98,7 +98,7 @@ public void printHeader(PrintStream out) { }
public void printFooter(PrintStream out) { }

public void printProfile(PrintStream out) {
printProfile(out, false);
printProfile(out, true);
}

public abstract void printProfile(PrintStream out, boolean first) ;
Expand Down
4 changes: 2 additions & 2 deletions spec/profiler/json_profile_printer_spec.rb
Expand Up @@ -9,7 +9,7 @@
end

it 'contains only the top invocation' do
json_output['methods'].should have(1).items
json_output['methods'].size.should == 1
json_output['methods'].first['name'].should == '(top)'
end

Expand Down Expand Up @@ -53,7 +53,7 @@
end

it 'contains data on the calls from parents, including calls, total, self and child time' do
method_invocation['parents'].should have(1).item
method_invocation['parents'].size.should == 1
call_data = method_invocation['parents'].find { |c| c['id'] == top_invocation['id'] }
call_data.should include('total_calls' => 1, 'total_time' => anything, 'self_time' => anything, 'child_time' => anything)
end
Expand Down

0 comments on commit f1eab90

Please sign in to comment.