profile: added example using the flags package

A strawman to iterate from.
Not to be picky, I've noticed some occurrences like this in the stdlib code as well and haven't really understood why, maybe they were slips, but why the parenthesis if it's just one value? If we would remove them it would look perfect to me. If you're busy just merge it and I can do it for you