Genese complexity report

<- vm.d.ts
Methods : 12
Complexity index : 7.3
Cyclomatic complexity : 11
Cognitive complexity
100 % Correct 12/12
0 % Warning 0/12 (threshold : 10)
0 % Error 0/12 (threshold : 20)
Cyclomatic complexity
100 % Correct 12/12
0 % Warning 0/12 (threshold : 5)
0 % Error 0/12 (threshold : 10)
Methods of vm.d.ts
Complexity Index 0.4 Cyclomatic complexity 0
                            
                                
                
                    constructor(code: string, options?: ScriptOptions); // ------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
runInContext Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                    
                    runInContext(contextifiedSandbox: Context, options?: RunningScriptOptions): any; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
runInNewContext Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                    
                    runInNewContext(sandbox?: Context, options?: RunningScriptOptions): any; // --------------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
runInThisContext Complexity Index 0.4 Cyclomatic complexity 1
                            
                                
                    
                    runInThisContext(options?: RunningScriptOptions): any; // ------------------------- +0.4 Complexity index (+0.4 atomic)
            
                            
                        
createCachedData Complexity Index 0.2 Cyclomatic complexity 1
                            
                                
                    
                    createCachedData(): Buffer; // ---------------------------------- +0.2 Complexity index (+0.2 atomic)
            
                            
                        
createContext Complexity Index 0.6 Cyclomatic complexity 1
                            
                                
                
                function createContext(sandbox?: Context, options?: CreateContextOptions): Context; // ------- +0.6 Complexity index (+0.6 atomic)
            
                            
                        
isContext Complexity Index 0.3 Cyclomatic complexity 1
                            
                                
                
                function isContext(sandbox: Context): boolean; // -------------------------------------------- +0.3 Complexity index (+0.3 atomic)
            
                            
                        
runInContext Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
                function runInContext(code: string, contextifiedSandbox: Context, options?: RunningScriptOptions | string): any; // ------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
runInNewContext Complexity Index 1 Cyclomatic complexity 1
                            
                                
                
                function runInNewContext(code: string, sandbox?: Context, options?: RunningScriptOptions | string): any; // --------------- +1.0 Complexity index (+1.0 atomic)
            
                            
                        
runInThisContext Complexity Index 0.8 Cyclomatic complexity 1
                            
                                
                
                function runInThisContext(code: string, options?: RunningScriptOptions | string): any; // ------------------------- +0.8 Complexity index (+0.8 atomic)
            
                            
                        
compileFunction Complexity Index 0.9 Cyclomatic complexity 1
                            
                                
                
                function compileFunction(code: string, params?: ReadonlyArray<string>, options?: CompileFunctionOptions): Function; // ------- +0.9 Complexity index (+0.9 atomic)
            
                            
                        
measureMemory Complexity Index 0.5 Cyclomatic complexity 1
                            
                                
                
            
                /**
                 * Measure the memory known to V8 and used by the current execution context or a specified context.
                 *
                 * The format of the object that the returned Promise may resolve with is
                 * specific to the V8 engine and may change from one version of V8 to the next.
                 *
                 * The returned result is different from the statistics returned by
                 * `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measures
                 * the memory reachable by V8 from a specific context, while
                 * `v8.getHeapSpaceStatistics()` measures the memory used by an instance
                 * of V8 engine, which can switch among multiple contexts that reference
                 * objects in the heap of one engine.
                 *
                 * @experimental
                 */
                function measureMemory(options?: MeasureMemoryOptions): Promise<MemoryMeasurement>; // --------------------------------------- +0.5 Complexity index (+0.5 atomic)