Permalink
Browse files

Adds README and example output.

  • Loading branch information...
1 parent bba07e8 commit 8ff3688bc75c8dc41173ead9a96fbcf1dc5006c2 @AndrewO committed Sep 15, 2011
Showing with 612 additions and 0 deletions.
  1. +17 −0 README.textile
  2. +595 −0 examples/prime.json
View
@@ -0,0 +1,17 @@
+h1. RubyProf/JSON
+
+This is a small project that adds a JSON printer to RubyProf to enable easy processing and querying of profiled sessions. Note that the JSON schema may change.
+
+h2. Usage
+
+For now (at least), usage is limited to scripts that directly call RubyProf's API (and not the `ruby_prof` script—I can't see an easy way to register a new formatter without directly manipulating the script).
+
+<pre><code>
+# Assuming `result` is a RubyProf::Result
+printer = RubyProf::JsonPrinter.new(result)
+printer.print(output)
+</code></pre>
+
+h2. Example
+
+See "the prime number example":examples/prime.json.
Oops, something went wrong.

0 comments on commit 8ff3688

Please sign in to comment.