Gunnar

mikronova/funnel-core

.nornir/assets/plandag-bottlenecks.svg

<svg viewBox="0 0 640 210" width="640" height="210" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Plan-DAG bottleneck ranking: n-001 has the wider fan-out (3 leaves, downstream 3) but n-005 heads a deeper chain (fan-out 1, downstream 4) and so outranks it — downstream reach beats local fan-out. The mother i-001 gates everything.">
  <defs>
    <marker id="bnarrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#8a8a99"/>
    </marker>
    <marker id="bnhot" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
      <path d="M 0 0 L 10 5 L 0 10 z" fill="#c0392b"/>
    </marker>
  </defs>

  <!-- mother -> the two task heads -->
  <g stroke="#8a8a99" stroke-width="1.3" fill="none">
    <line x1="88" y1="98" x2="120" y2="55" marker-end="url(#bnarrow)"/>
  </g>
  <!-- deep chain (hot / top task bottleneck): mother -> n-005 -> n-006 ... n-009 -->
  <g stroke="#c0392b" stroke-width="1.7" fill="none">
    <line x1="88" y1="102" x2="120" y2="150" marker-end="url(#bnhot)"/>
    <line x1="220" y1="155" x2="252" y2="155" marker-end="url(#bnhot)"/>
    <line x1="322" y1="155" x2="354" y2="155" marker-end="url(#bnhot)"/>
    <line x1="424" y1="155" x2="456" y2="155" marker-end="url(#bnhot)"/>
    <line x1="526" y1="155" x2="558" y2="155" marker-end="url(#bnhot)"/>
  </g>
  <!-- wide, shallow fan-out from n-001 -->
  <g stroke="#8a8a99" stroke-width="1.3" fill="none">
    <line x1="220" y1="48" x2="252" y2="26" marker-end="url(#bnarrow)"/>
    <line x1="220" y1="52" x2="252" y2="52" marker-end="url(#bnarrow)"/>
    <line x1="220" y1="56" x2="252" y2="78" marker-end="url(#bnarrow)"/>
  </g>

  <g font-family="ui-sans-serif, system-ui, sans-serif" font-size="12" text-anchor="middle">
    <!-- mother: the overall top constraint -->
    <rect x="18" y="83" width="70" height="30" rx="6" fill="#eef0f4" stroke="#5b6b8c" stroke-width="1.4"/>
    <text x="53" y="102" fill="#000000">i-001</text>
    <text x="53" y="128" fill="#5b6b8c" font-size="9">downstream 9 · #1</text>

    <!-- wide, shallow head -->
    <rect x="122" y="37" width="98" height="30" rx="6" fill="#fbf3e0" stroke="#d9a441" stroke-width="1.3"/>
    <text x="171" y="56" fill="#000000">n-001</text>
    <text x="171" y="30" fill="#b6862d" font-size="9">fan-out 3 · downstream 3</text>
    <!-- three shallow leaves -->
    <rect x="254" y="12" width="70" height="26" rx="6" fill="#f4f5f8" stroke="#b8b8c4" stroke-width="1.1"/>
    <text x="289" y="29" fill="#000000">n-002</text>
    <rect x="254" y="39" width="70" height="26" rx="6" fill="#f4f5f8" stroke="#b8b8c4" stroke-width="1.1"/>
    <text x="289" y="56" fill="#000000">n-003</text>
    <rect x="254" y="66" width="70" height="26" rx="6" fill="#f4f5f8" stroke="#b8b8c4" stroke-width="1.1"/>
    <text x="289" y="83" fill="#000000">n-004</text>

    <!-- narrow, deep head (top TASK bottleneck) -->
    <rect x="122" y="140" width="98" height="30" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.5"/>
    <text x="171" y="159" fill="#000000">n-005</text>
    <text x="171" y="186" fill="#c0392b" font-size="9">fan-out 1 · downstream 4 · #1 task</text>
    <!-- the deep chain -->
    <rect x="254" y="142" width="68" height="26" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.2"/>
    <text x="288" y="159" fill="#000000">n-006</text>
    <rect x="356" y="142" width="68" height="26" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.2"/>
    <text x="390" y="159" fill="#000000">n-007</text>
    <rect x="458" y="142" width="68" height="26" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.2"/>
    <text x="492" y="159" fill="#000000">n-008</text>
    <rect x="560" y="142" width="68" height="26" rx="6" fill="#fdece9" stroke="#c0392b" stroke-width="1.2"/>
    <text x="594" y="159" fill="#000000">n-009</text>
  </g>

  <text x="320" y="204" font-family="ui-sans-serif, system-ui, sans-serif" font-size="10" fill="#c0392b" text-anchor="middle">bottlenecks() ranks by downstream reach — the deep n-005 (4) outranks the wide n-001 (3) despite the smaller fan-out</text>
</svg>