Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "internal/util/memory"

Index

Variables

Let DataDirectory

DataDirectory: string = `${appRoot.path}/heap`

Functions

formatMillis

  • formatMillis(millis: number): string

gc

  • gc(): void

heapDump

  • heapDump(): string

initMemoryMonitoring

  • initMemoryMonitoring(dataDirectory?: string, log?: boolean): void
  • Initialise memory monitoring. This is will set the data directory for heap dumps and print the head usage to the console every 60 seconds.

    Parameters

    • Default value dataDirectory: string = `${appRoot.path}/heap`
    • Default value log: boolean = true

    Returns void

memoryUsage

  • memoryUsage(): { up_time: string; heap: object; memory: object }
  • Get some memory statistics.

    Returns { up_time: string; heap: object; memory: object }

    ; memory: {free: string; total: string}; up_time: string}}

    • up_time: string
    • heap: object
      • rss: string
      • total: string
      • used: string
    • memory: object
      • free: string
      • total: string

mtrace

  • mtrace(): void

Generated using TypeDoc