import si from 'systeminformation';
import { TableSizeObject } from '../../dataLayer/harperBridge/TableSizeObject.ts';
import { StatsHistogramData } from '@harperfast/rocksdb-js';
export declare class SystemInformationRequest {
    operator: string;
    attributes: string[];
    constructor(attributes: any);
}
export declare class SystemInformationResponse {
    system?: SystemInfo;
    time?: TimeData;
    cpu?: CpuInfo;
    memory?: MemoryInfo;
    disk?: DiskInfo;
    network?: NetworkInfo;
    harperdb_processes?: HarperdbProcesses;
    table_size?: TableSizeObject[];
    metrics?: DatabaseMetrics;
    threads?: Record<string, unknown>;
    constructor(system?: SystemInfo, time?: TimeData, cpu?: CpuInfo, memory?: MemoryInfo, disk?: DiskInfo, network?: NetworkInfo, harperdbProcesses?: HarperdbProcesses, tableSize?: TableSizeObject[], metrics?: DatabaseMetrics, threads?: Record<string, unknown>);
}
type TimeData = si.Systeminformation.TimeData;
/**
 * Returns the current local time, uptime, timezone, and timezone name.
 */
export declare function getTimeInfo(): TimeData;
type CpuInfo = Pick<si.Systeminformation.CpuData, 'manufacturer' | 'brand' | 'vendor' | 'speed' | 'cores' | 'physicalCores' | 'performanceCores' | 'efficiencyCores' | 'processors' | 'flags' | 'virtualization'> & {
    cpu_speed: si.Systeminformation.CpuCurrentSpeedData;
    current_load: Pick<si.Systeminformation.CurrentLoadData, 'avgLoad' | 'currentLoad' | 'currentLoadUser' | 'currentLoadSystem' | 'currentLoadNice' | 'currentLoadIdle' | 'currentLoadIrq'> & {
        cpus: Pick<si.Systeminformation.CurrentLoadCpuData, 'load' | 'loadUser' | 'loadSystem' | 'loadNice' | 'loadIdle' | 'loadIrq'>[];
    };
};
/**
 * Detects CPU information such as manufacturer, brand, vendor, speed, cores, physical cores, and
 * processors.
 */
export declare function getCPUInfo(): Promise<CpuInfo | null>;
type MemoryInfo = Pick<si.Systeminformation.MemData, 'total' | 'free' | 'used' | 'active' | 'available' | 'reclaimable' | 'swaptotal' | 'swapused' | 'swapfree' | 'writeback' | 'dirty'> & NodeJS.MemoryUsage;
/**
 * Detect system and Node.js memory usage.
 */
export declare function getMemoryInfo(): Promise<MemoryInfo | null>;
type CoreInfo = si.Systeminformation.ProcessesProcessData & {
    parent?: string;
};
type HarperdbProcesses = {
    core: CoreInfo[];
};
/**
 * Detects the Harper process PID and returns the process info.
 * @returns {Promise<{core: []}>}
 */
export declare function getHDBProcessInfo(): Promise<HarperdbProcesses>;
type DiskInfo = {
    io?: Pick<si.Systeminformation.DisksIoData, 'rIO' | 'wIO' | 'tIO'>;
    read_write?: Pick<si.Systeminformation.FsStatsData, 'rx' | 'tx' | 'wx'>;
    size?: si.Systeminformation.FsSizeData[];
    free_space_basis?: 'quota' | 'filesystem';
    quota_size_bytes?: number;
    quota_used_bytes?: number;
    quota_status_age_seconds?: number;
};
/**
 * Retrieves disk related info & stats
 * @returns {Promise<DiskInfo>}
 */
export declare function getDiskInfo(): Promise<DiskInfo>;
type NetworkInfo = {
    default_interface: string | null;
    latency: si.Systeminformation.InetChecksiteData | Record<never, never>;
    interfaces: Pick<si.Systeminformation.NetworkInterfacesData, 'iface' | 'ifaceName' | 'default' | 'ip4' | 'ip4subnet' | 'ip6' | 'ip6subnet' | 'mac' | 'operstate' | 'type' | 'duplex' | 'speed'>[];
    stats: any[];
    connections: any[];
};
/**
 * Detects networking connection information & stats
 * @returns {Promise<{interfaces: [], default_interface: null, stats: [], latency: {}, connections: []}>}
 */
export declare function getNetworkInfo(): Promise<NetworkInfo>;
type SystemInfo = Partial<Pick<si.Systeminformation.OsData, 'platform' | 'distro' | 'release' | 'codename' | 'kernel' | 'arch' | 'hostname' | 'fqdn'>> & {
    node_version?: string;
    npm_version?: string;
};
/**
 * Detect operating system and Node.js runtime information.
 * @returns {Promise<SystemInfo>}
 */
export declare function getSystemInformation(): Promise<SystemInfo>;
/**
 * Retrieves table size information.
 * @returns {TableSizeObject[]}
 */
export declare function getTableSize(): TableSizeObject[];
type LMDBEnvStats = {
    entryCount: number;
    overflowPages: number;
    pageSize: number;
    treeBranchPageCount: number;
    treeDepth: number;
    treeLeafPageCount: number;
};
type LMDBStats = LMDBEnvStats & {
    free: LMDBEnvStats;
    lastPageNumber: number;
    lastTxnId: number;
    mapSize: number;
    maxReaders: number;
    numReaders: number;
    root: LMDBEnvStats;
};
type RocksDBStats = {
    blockCacheCapacity: number;
    blockCacheDataHit: number;
    blockCacheDataMiss: number;
    blockCacheFilterHit: number;
    blockCacheFilterMiss: number;
    blockCacheHit: number;
    blockCacheIndexHit: number;
    blockCacheIndexMiss: number;
    blockCacheMiss: number;
    blockCachePinnedUsage: number;
    blockCacheUsage: number;
    bytesRead: number;
    bytesWritten: number;
    dbFlushMicros: StatsHistogramData;
    dbGetMicros: StatsHistogramData;
    dbSeekMicros: StatsHistogramData;
    dbWriteMicros: StatsHistogramData;
    noFileErrors: number;
    numberKeysRead: number;
    numberKeysWritten: number;
    numberReseeksIteration: number;
    numRunningFlushes: number;
    oldestSnapshotTime: number;
    stallMicros: number;
    txnOverheadMutexOldCommitMap: number;
    txnOverheadMutexPrepare: number;
    txnOverheadMutexSnapshot: number;
};
type RocksDBTableStats = {
    blobdbValueSize: StatsHistogramData;
    bloomFilterFullPositive: number;
    bloomFilterFullTruePositive: number;
    bloomFilterUseful: number;
    compactReadBytes: number;
    compactWriteBytes: number;
    compactionCancelled: number;
    compactionPending: number;
    compactionTimesMicros: StatsHistogramData;
    curSizeActiveMemTable: number;
    curSizeAllMemTables: number;
    currentSuperVersionNumber: number;
    dbIterBytesRead: number;
    dbWriteStall: StatsHistogramData;
    estimateLiveDataSize: number;
    estimateNumKeys: number;
    estimatePendingCompactionBytes: number;
    liveBlobFileSize: number;
    liveSstFilesSize: number;
    memTableFlushPending: number;
    memtableHit: number;
    memtableMiss: number;
    numBlobFiles: number;
    numDeletesActiveMemTable: number;
    numEntriesActiveMemTable: number;
    numImmutableMemTable: number;
    numImmutableMemTableFlushed: number;
    numLiveVersions: number;
    numRunningCompactions: number;
    readAmpEstimateUsefulBytes: number;
    readAmpTotalReadBytes: number;
    sizeAllMemTables: number;
    sstReadMicros: StatsHistogramData;
    totalBlobFileSize: number;
    totalSstFilesSize: number;
};
type TableStats = RocksDBTableStats | Pick<LMDBStats, 'entryCount' | 'overflowPages' | 'treeBranchPageCount' | 'treeDepth' | 'treeLeafPageCount'>;
type DBStats = RocksDBStats & {
    audit?: Pick<LMDBStats, 'treeDepth' | 'treeBranchPageCount' | 'treeLeafPageCount' | 'entryCount' | 'overflowPages'>;
    readers?: {
        pid: string;
        thread: string;
        txnid: string;
    }[];
    tables: Record<string, TableStats>;
};
type DatabaseMetrics = {
    [dbName: string]: DBStats;
};
/**
 * Get RocksDB or LMDB metrics for all databases and tables.
 * @returns {Promise<DatabaseMetrics>}
 */
export declare function getMetrics(): Promise<DatabaseMetrics>;
/**
 * Retrieves system information for the requested attributes.
 * @param {SystemInformationRequest} systemInfoReq
 * @returns {Promise<SystemInformationResponse>}
 */
export declare function systemInformation(systemInfoReq: SystemInformationRequest): Promise<SystemInformationResponse>;
export {};
