-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
52 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
import { Sampler, SamplerOptions } from './types/sampler' | ||
import errors = require('./types/errors') | ||
import errors from './types/errors' | ||
import { CPUMetric } from './types/cpuMetric' | ||
import { EventLoopDelayMetric } from './types/eventLoopDelayMetric' | ||
import { ResourceUsageMetric } from './types/resourceUsageMetric' | ||
import { EventLoopUtilizationMetric } from './types/eventLoopUtilizationMetric' | ||
import { GCEntry, GCAggregatedEntry, GCMetric } from './types/gcMetric' | ||
|
||
declare function createSampler(options?: SamplerOptions): Sampler | ||
export default createSampler | ||
declare module 'doc' { | ||
|
||
export { createSampler } | ||
export { Sampler, SamplerOptions } | ||
export { errors } | ||
export * from './types/cpuMetric' | ||
export * from './types/eventLoopDelayMetric' | ||
export * from './types/resourceUsageMetric' | ||
export * from './types/eventLoopUtilizationMetric' | ||
export * from './types/gcMetric' | ||
} | ||
declare namespace doc { | ||
export { errors } | ||
export type { | ||
Sampler, SamplerOptions, | ||
CPUMetric, | ||
EventLoopDelayMetric, | ||
ResourceUsageMetric, | ||
EventLoopUtilizationMetric, | ||
GCEntry, GCAggregatedEntry, GCMetric | ||
} | ||
export const createSampler: (options?: SamplerOptions) => Sampler | ||
export { createSampler as default } | ||
} | ||
declare function doc(options?: doc.SamplerOptions): doc.Sampler | ||
export = doc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,9 @@ | ||
/** | ||
* On Node 12 and above this is a Histogram instance from 'perf_hooks'. | ||
*/ | ||
declare interface EventLoopDelayHistogram { | ||
min: number, | ||
max: number, | ||
mean: number, | ||
stddev: number, | ||
percentiles: Map<number, number>, | ||
exceeds: number, | ||
} | ||
import { IntervalHistogram } from "perf_hooks"; | ||
|
||
export interface EventLoopDelayMetric { | ||
/** | ||
* computed delay in milliseconds | ||
*/ | ||
computed: number, | ||
raw: number | EventLoopDelayHistogram | ||
raw: IntervalHistogram | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import { EventLoopUtilization } from "perf_hooks" | ||
|
||
export interface EventLoopUtilizationMetric { | ||
/** | ||
* Raw metric value | ||
*/ | ||
raw: { | ||
idle: number, | ||
active: number, | ||
utilization: number | ||
} | ||
raw: EventLoopUtilization | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters