MCPcopy Create free account
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/effect/src/Metric.ts:1794–1801  ·  view source on GitHub ↗
(id: string, options?: {
    readonly description?: string | undefined
    readonly attributes?: Metric.Attributes | undefined
    readonly preregisteredWords?: ReadonlyArray<string> | undefined
  })

Source from the content-addressed store, hash-verified

1792 readonly #preregisteredWords: ReadonlyArray<string> | undefined
1793
1794 constructor(id: string, options?: {
1795 readonly description?: string | undefined
1796 readonly attributes?: Metric.Attributes | undefined
1797 readonly preregisteredWords?: ReadonlyArray<string> | undefined
1798 }) {
1799 super(id, options?.description, attributesToRecord(options?.attributes))
1800 this.#preregisteredWords = options?.preregisteredWords
1801 }
1802
1803 createHooks(): Metric.Hooks<string, FrequencyState> {
1804 const occurrences = new Map<string, number>()

Callers

nothing calls this directly

Calls 1

attributesToRecordFunction · 0.85

Tested by

no test coverage detected