Module: Performance
- Defined in:
- lib/tasks/performance_report.rb
Overview
Standalone benchmark runner that emits JSON results on stdout.
Used by performance_comparator.rb to run benchmarks in a clean Ruby process per branch — sharing no state with the comparator itself. This isolates each branch’s Canon implementation from the other.
Defined Under Namespace
Modules: DataGenerator Classes: Report
Constant Summary collapse
- REPORT_ID =
SecureRandom.hex(4).freeze
- DEFAULT_RUN_TIME =
Integer(ENV.fetch("CANON_PERF_RUN_TIME", "5"))
- DEFAULT_WARMUP =
Integer(ENV.fetch("CANON_PERF_WARMUP", "2"))
- DEFAULT_ITEMS =
Integer(ENV.fetch("CANON_PERF_ITEMS", "50"))
- BENCHMARKS =
{ xml_parse_dom_simple: { category: "xml_parsing", name: "DOM (simple)" }, xml_parse_sax_simple: { category: "xml_parsing", name: "SAX (simple)" }, xml_parse_dom_large: { category: "xml_parsing", name: "DOM (large)" }, xml_parse_sax_large: { category: "xml_parsing", name: "SAX (large)" }, html_parse_simple: { category: "html_parsing", name: "Simple HTML" }, html_parse_complex: { category: "html_parsing", name: "Complex HTML" }, xml_compare_identical: { category: "xml_comparison", name: "Identical XML" }, xml_compare_similar: { category: "xml_comparison", name: "Similar XML" }, xml_compare_different: { category: "xml_comparison", name: "Different XML" }, html_compare_identical: { category: "html_comparison", name: "Identical HTML" }, html_compare_similar: { category: "html_comparison", name: "Similar HTML" }, html_compare_different: { category: "html_comparison", name: "Different HTML" }, xml_c14n_format: { category: "formatting", name: "XML C14N" }, json_format: { category: "formatting", name: "JSON" }, yaml_format: { category: "formatting", name: "YAML" }, }.freeze