Home / Class/ Instrumentation Class — tailwindcss Architecture

Instrumentation Class — tailwindcss Architecture

Architecture documentation for the Instrumentation class in instrumentation.ts from the tailwindcss codebase.

Entity Profile

Dependency Diagram

graph TD
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127["Instrumentation"]
  9e9a7c7d_f843_0850_e73b_8a417af4e602["instrumentation.ts"]
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127 -->|defined in| 9e9a7c7d_f843_0850_e73b_8a417af4e602
  22d4c2e8_dc90_1645_f8f6_7cf2d4b3c368["start()"]
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127 -->|method| 22d4c2e8_dc90_1645_f8f6_7cf2d4b3c368
  b9dcd96f_6821_b870_253e_1083d8548c8a["end()"]
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127 -->|method| b9dcd96f_6821_b870_253e_1083d8548c8a
  3363afb8_0625_c563_0ffc_c92c5f39cf90["hit()"]
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127 -->|method| 3363afb8_0625_c563_0ffc_c92c5f39cf90
  f8468600_0590_d28b_d368_70a7ecca74ef["error()"]
  dca91bbb_e9eb_1bac_cbf5_45e0d5081127 -->|method| f8468600_0590_d28b_d368_70a7ecca74ef

Relationship Graph

Source Code

packages/@tailwindcss-browser/src/instrumentation.ts lines 1–29

export class Instrumentation {
  start(label: string) {
    performance.mark(`${label} (start)`)
  }

  end(label: string, detail?: any) {
    performance.mark(`${label} (end)`)

    performance.measure(label, {
      start: `${label} (start)`,
      end: `${label} (end)`,
      detail,
    })
  }

  hit(label: string, detail?: any) {
    performance.mark(label, {
      detail,
    })
  }

  error(error: any) {
    performance.mark(`(error)`, {
      detail: { error: `${error}` },
    })

    throw error
  }
}

Domain

Frequently Asked Questions

What is the Instrumentation class?
Instrumentation is a class in the tailwindcss codebase, defined in packages/@tailwindcss-browser/src/instrumentation.ts.
Where is Instrumentation defined?
Instrumentation is defined in packages/@tailwindcss-browser/src/instrumentation.ts at line 1.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free