Command-line tool for analyzing memory usage changes in CUBRID memmon files using SQL filtering.
wget https://github.com/vimkim/cubrid-memmondiff/releases/latest/download/memmondiff-linux-amd64go install github.com/vimkim/cubrid-memmondiff@latestgit clone https://github.com/vimkim/cubrid-memmondiff
cd cubrid-memmondiff
go build .memmondiff [flags] <before_file> <after_file>--color: Output coloring (auto, always, never)--pretty-print: Format numbers with commas--sql: Filter results using SQL WHERE clause--raw-query: (experimental) Execute arbitrary SQL queries against the diff data
# Compare two memmon files
memmondiff before.txt after.txt
# Pretty print numbers
memmondiff --pretty-print before.txt after.txt
# Filter large memory changes
memmondiff --sql "diff >= 10000" before.txt after.txt# Filter by filename pattern
memmondiff --sql "filename LIKE '%heap%'" before.txt after.txt
# Complex conditions
memmondiff --sql "diff >= 5000 AND filename NOT LIKE '%temp%'" before.txt after.txt
# Raw SQL queries
memmondiff --raw-query "SELECT SUM(diff) FROM entries WHERE diff >= 10000" before.txt after.txtYou can refer to the DDL used to create the internal temporary memory database to customize your raw query (which is subject to change).
CREATE TABLE entries (
filename TEXT,
diff INTEGER,
after INTEGER,
before INTEGER
)- Supported from v0.1.1
- For building from source, use 'CGO_ENABLED=1'. Zig compiler recommended (see justfile).
- Linux
- Windows (requires CGO_ENABLED=1)
- macOS

