UNPKG

@featurevisor/core

Version:

Core package of Featurevisor for Node.js usage

23 lines (22 loc) 1.09 kB
import { FeaturevisorInstance } from "@featurevisor/sdk"; import { Dependencies } from "../dependencies"; import { Plugin } from "../cli"; export interface BenchmarkOutput { value: any; duration: number; } export declare function benchmarkFeatureFlag(f: FeaturevisorInstance, featureKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput; export declare function benchmarkFeatureVariation(f: FeaturevisorInstance, featureKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput; export declare function benchmarkFeatureVariable(f: FeaturevisorInstance, featureKey: string, variableKey: string, context: Record<string, unknown>, n: number): BenchmarkOutput; export interface BenchmarkOptions { environment?: string; feature: string; n: number; context: Record<string, unknown>; variation?: boolean; variable?: string; schemaVersion?: string; inflate?: number; } export declare function benchmarkFeature(deps: Dependencies, options: BenchmarkOptions): Promise<void>; export declare const benchmarkPlugin: Plugin;