module

CogUtil::MemoryProfiler

Memory profiling and measurement utilities

Class methods

benchmark_atomspace_scaling(atomspace, scale_factors = [100, 500, 1000, 2000]) : Array(MemoryBenchmarkResult)

Benchmark AtomSpace memory scaling

benchmark_memory(operation_name : String, &) : MemoryBenchmarkResult

Benchmark memory usage of an operation

detect_memory_leaks(iterations = 100, &) : Bool

Memory leak detection helper

estimate_atom_memory(atom) : AtomMemoryInfo

Estimate memory usage of an atom (comparable to C++ estimateOfAtomSize)

evaluate_memory_efficiency(result : MemoryBenchmarkResult) : Hash(String, Bool | Float64)

Compare memory efficiency with target thresholds

generate_memory_report(results : Array(MemoryBenchmarkResult)) : String

Generate memory comparison report

get_system_memory_info

Get current system memory information

Nested types