You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is especially important with ProfilePrinter implementations like HtmlProfilePrinter, which need to insert a proper header and footer in order for the resultant document to render properly.
I would recommend that the example code provided on the wiki page provide a more complete example, such as:
It's easy to compare the two by running the following code, and then diffing profile_missing.html with profile.html:
printer = JRuby::Profiler::HtmlProfilePrinter.new(result)
File.open("profile_missing.html", "w") do |fio|
printer.printProfile(fio)
end
File.open("profile.html", "w") do |fio|
ps = java.io.PrintStream.new(fio.to_outputstream)
printer.printHeader(ps)
printer.printProfile(ps)
printer.printFooter(ps)
end
The text was updated successfully, but these errors were encountered:
The example code provided on the wiki page for profiling will not print the header or footer for the chosen printer.
The code in question:
This is especially important with ProfilePrinter implementations like HtmlProfilePrinter, which need to insert a proper header and footer in order for the resultant document to render properly.
I would recommend that the example code provided on the wiki page provide a more complete example, such as:
It's easy to compare the two by running the following code, and then diffing profile_missing.html with profile.html:
The text was updated successfully, but these errors were encountered: