VIPSPROFILE(1)

πŸ’– VIPSPROFILE(1) πŸ’–

ok so bestie, welcome to the vipsprofile page β€” it lives in the General Commands Manual and it's lowkey one of the most useful little gremlins in the whole vips family. let's get into it 🫢


✨ NAME ✨

vipsprofile β€” analyze vips profiles, aka the vibe check for your vips performance πŸ’…


🌸 SYNOPSIS 🌸

vipsprofile

that's it. no flags, no args, no drama. she just works ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so vipsprofile(1) analyzes the file written by the --vips-profile option, calculates some statistics, and draws a graph of evaluation. three jobs, zero complaints, main character energy fr fr πŸ‘‘

here's the tea: run any vips program with the --vips-profile option and it'll generate a file called vips-profile.txt. that file is stuffed with timing information about CPU use, memory use and thread synchronisation. it's giving receipts, and we love that πŸ§ΎπŸ’–

then you run vipsprofile(1) to load this file, calculate some statistics, and draw a graph of evaluation saved to vips-profile.svg. this analysis can help track down performance problems β€” like, it's literally the detective that finds out why your thing is slow πŸ”

for example:

$ vips sharpen shark.jpg x.jpg --vips-profile
recording profile in vips-profile.txt
$ vipsprofile
reading from vips-profile.txt
loaded 3622 events
total time = 0.138322
name          alive   wait%   work%   unkn%   memory  peakm
worker 20      0.069  34.5    58.9    6.65    3.14    5.56
worker 21       0.07  1.36    60.2    38.4    2.65    5.07
worker 22       0.07  33      55.8    11.1    2.62    5.04
worker 23      0.072  34.2    59.7    6.15    2.72    5.14
wbuffer 24     0.075  99      1.03    0.00401 0       0
wbuffer 25     0.075  95.6    4.39    0.00667 0       0
main 26         0.14  52.8    0       47.2    -11.1   0.787
peak memory = 21.6 MB
writing to vips-profile.svg

look at those workers go 😭 they're all doing numbers and we're just sitting here reading a table. iconic behaviour, truly.

ngl, if you've never seen this output before, it's a whole lot of columns staring back at you. but that's the point β€” vipsprofile does the math so you don't have to πŸ’…

πŸŽ€ RETURN VALUE πŸŽ€

returns 0 on success and non-zero on error. so if you get a 0, she ate. if you don't... something went sideways bestie πŸ™ˆ


🌈 SEE ALSO 🌈


and that's the whole page!! mwah πŸ’‹

this lil slice of documentation is from the General Commands Manual, dated 13 December 2013 β€” a classic, a vintage, an heirloom πŸŽ€ go forth and profile your vips programs, bestie, and may your peak memory always be reasonable βœ¨πŸ’–