Skip to main contentreport-toolkit

Report

Represents a Diagnostic Report.

Hierarchy

  • Report

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new Report(report: DiagnosticReport, filepath?: string): Report

Creates shallow copies of root props in report; assigns internally-used Symbols.

Parameters:

NameTypeDescription
reportDiagnosticReportRaw object
filepath?stringOriginal filepath of report, if available. Defaults to NO_FILEPATH

Returns: Report

Properties

[kReportFilepath]

[kReportFilepath]: string


[kReport]

[kReport]: boolean


environmentVariables

environmentVariables: object

Type declaration:

  • [ x: string]: string

header: object

Type declaration:

  • arch: string

  • commandLine: string[]

  • componentVersions(): object

  • cwd: string

  • dumpEventTime: string

  • dumpEventTimeStamp: string

  • event: string

  • filename: string

  • host: string

  • nodejsVersion: string

  • osMachine: string

  • osName: string

  • osRelease: string

  • osVersion: string

  • platform: string

  • processId: number

  • release(): object

    • headersUrl: string

    • name: string

    • sourceUrl: string

  • trigger: string

  • wordSize: number


javascriptHeap

javascriptHeap: object

Type declaration:

  • availableMemory: number

  • heapSpaces(): object

  • memoryLimit: number

  • totalCommittedMemory: number

  • totalMemory: number

  • usedMemory: number


javascriptStack

javascriptStack: object

Type declaration:

  • message: string

  • stack: string[]


libuv

libuv: object[]


nativeStack

nativeStack: NativeStackFrame[]


resourceUsage

resourceUsage: object

Type declaration:

  • cpuConsumptionPercent: number

  • fsActivity(): object

    • reads: number

    • writes: number

  • kernelCpuSeconds: number

  • maxRss: number

  • pageFaults(): object

    • IONotRequired: number

    • IORequired: number

  • userCpuSeconds: number


sharedObjects

sharedObjects: string[]


userLimits

userLimits: object

Type declaration:

Accessors

filepath

get filepath(): string

Original filepath of report, if available. Defaults to NO_FILEPATH.

Returns: string

Methods

Static create

create(rawReport: DiagnosticReport | Report, filepath: string): Readonly‹Report

Creates a read-only Report from a ReportLike value. Use this instead of new Report()!

Parameters:

NameTypeDescription
rawReportDiagnosticReport | Report-
filepathstring

Returns: Readonly‹Report


Static isReport

isReport(value: any): boolean

Returns true if the value is an object having a property report-toolkit-report Symbol with value true.

Parameters:

NameTypeDescription
valueany

Returns: boolean


Static isReportLike

isReportLike(value: any): boolean

Returns true if value has all expected root properties of a Diagnostic Report (as returned by process.report.getReport()), or is a Report.

Parameters:

NameTypeDescription
valueany

Returns: boolean