///|
/// SVG Rendering Benchmarks

// Simple rectangle
test "bench: render simple rect 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Multiple rectangles

///|
test "bench: render 10 rects 200x200" (b : @bench.T) {
  let svg = "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 200, 200)) })
}

// Circle

///|
test "bench: render circle 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Path with curves

///|
test "bench: render path bezier 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Complex path (star)

///|
test "bench: render path star 200x200" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 200, 200)) })
}

// Linear gradient

///|
test "bench: render linear gradient 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Radial gradient

///|
test "bench: render radial gradient 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// ClipPath

///|
test "bench: render clipPath 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Mask

///|
test "bench: render mask 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Transform

///|
test "bench: render transform rotate 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Nested groups

///|
test "bench: render nested groups 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Use element

///|
test "bench: render use element 200x200" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 200, 200)) })
}

// Large canvas

///|
test "bench: render rect 500x500" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 500, 500)) })
}

// Stroked path

///|
test "bench: render thick stroke 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Polygon

///|
test "bench: render polygon 100x100" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 100, 100)) })
}

// Parse only (no render)

///|
test "bench: parse only complex svg" (b : @bench.T) {
  let svg = ""
  b.bench(fn() { b.keep(parse_svg_document(svg)) })
}

// Parse + render full pipeline

///|
test "bench: full pipeline 200x200" (b : @bench.T) {
  let svg = "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    "" +
    ""
  b.bench(fn() { b.keep(render_svg_to_image(svg, 200, 200)) })
}