You probably can do this through the proc filesystem/cgroups.
If you think about it, you can use cgroups to limit the bandwidth, so you can also use it to measure it.
out of curiosity, do you cap the trial accounts anyhow?
First time I'm trying Kagi, and it's been one minute+ and it is still haven't started showing "Results" (when using `!code`). Just in case you do cap, probably not the best approach if you want to attract people!
update: it actually timed out with no result/explanation.