# $Id: print-resources.bro,v 1.3 2002/10/13 21:07:59 vern Exp $

# Logs Bro resource usage information upon termination.

event bro_done()
	{
	local res = resource_usage();

	log fmt("elapsed time = %s, total CPU = %s, maximum memory = %d KB, peak connections = %d, peak timers = %d, peak fragments = %d",
		res$real_time, res$user_time + res$system_time,
		res$mem,
		res$max_TCP_conns + res$max_UDP_conns + res$max_ICMP_conns,
		res$max_timers, res$max_fragments);
	}
