UNPKG

@oaklean/profiler-core

Version:

Part of the @oaklean suite. It provides all basic functions to work with the `.oak` file format. It allows parsing the `.oak` file format as well as tools for analyzing the measurement values. It also provides all necessary capabilities required for prec

30 lines (29 loc) 2.3 kB
/// <reference types="node" /> import { ModuleIndex } from './ModuleIndex'; import { PathIndex } from './PathIndex'; import { SourceNodeIndex } from './SourceNodeIndex'; import { BaseModel } from '../BaseModel'; import { ModelMap } from '../ModelMap'; import { NodeModule } from '../NodeModule'; import { GlobalIdentifier } from '../../system/GlobalIdentifier'; import { PathID_number, ModuleID_number, SourceNodeIndexType, SourceNodeID_number, NodeModuleIdentifier_string, IndexRequestType, GlobalIndexType, IGlobalIndex } from '../../types'; export declare class GlobalIndex extends BaseModel { currentId: number; moduleMap: ModelMap<NodeModuleIdentifier_string, ModuleIndex>; engineModule: NodeModule; moduleReverseIndex: ModelMap<number, ModuleIndex>; pathReverseIndex: ModelMap<number, PathIndex>; sourceNodeReverseIndex: ModelMap<number, SourceNodeIndex<SourceNodeIndexType.SourceNode>>; constructor(engineModule: NodeModule, currentId?: number); toBuffer(): Buffer; toJSON(): IGlobalIndex; static fromJSON(json: string | IGlobalIndex, engineModule: NodeModule): GlobalIndex; setReverseIndex<T extends GlobalIndexType>(id: number, index: T extends 'module' ? ModuleIndex : T extends 'path' ? PathIndex : T extends 'sourceNode' ? SourceNodeIndex<SourceNodeIndexType.SourceNode> : never, type: T): void; getModuleIndexByID(id: ModuleID_number): ModuleIndex | undefined; getPathIndexByID(id: PathID_number): PathIndex | undefined; getSourceNodeIndexByID(id: SourceNodeID_number): SourceNodeIndex<SourceNodeIndexType.SourceNode> | undefined; newId(index: ModuleIndex | PathIndex | SourceNodeIndex<SourceNodeIndexType.SourceNode>, type: GlobalIndexType): number; getLangInternalIndex<T extends IndexRequestType, R = T extends 'upsert' ? ModuleIndex : (ModuleIndex | undefined)>(indexRequestType: T): R; getModuleIndex<T extends IndexRequestType, R = T extends 'upsert' ? ModuleIndex : (ModuleIndex | undefined)>(indexRequestType: T, nodeModuleIdentifier?: NodeModuleIdentifier_string): R; getSourceNodeIndex<T extends IndexRequestType, R = T extends 'upsert' ? SourceNodeIndex<SourceNodeIndexType.SourceNode> : (SourceNodeIndex<SourceNodeIndexType.SourceNode> | undefined)>(indexRequestType: T, identifier: GlobalIdentifier): R; }