Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
benchmark_enable(3)		 Arcan Lua API		   benchmark_enable(3)

NAME
       benchmark_enable	- Toggle the gathering of benchmark data on / off.

SYNOPSIS
       nil
       benchmark_enable( bool:toggle=on	)
       benchmark_enable( )
       benchmark_enable( number:size_kb, func:callback(tracetbl) )

DESCRIPTION
       This  function  is used to enable collection of timing data of the ren-
       dering pipeline for benchmarking	purposes,  or  for  generating	system
       traces for detailed performance analysis.

       If  the size_mb	and callback  argument form is used, up	to roughly the
       set size	of trace data will be collected.  When	the  buffer  is	 full,
       callback	  will be triggered containing the results and collection will
       be terminated.

       Collection in trace mode	can also be stopped by	calling	 benchmark_en-
       able  again  with  any argument form, the callback will be triggered if
       any data	had been collected before stopping. The	callback will also  be
       invoked	(if it has not already)	if there is a script error or ANR  re-
       set.

       Scripts can also	insert custom trace data into the buffer  through  the
       function	 benchmark_tracedata  which will short circuit when collection
       is disabled.

       The entries in tracetbl	is n indexed  of  tables  with	the  following
       fields:	number:timestamp  string:system	 (graphics,  3d, video,	audio,
       event, frameserver,  lua)  string:subsystem  int:trigger	 (0  one-shot,
       1:enter,	2:exit)	string:path int:quantity string:message	int:identifier

NOTES
       1      All calls	to this	function will reset all	timestamp buffers.

       2      Since  this  can be called from within error handling, make sure
	      that the dumping code is robust and fast.	The ANR	 watchdog will
	      also be disabled while inside the	callback.

SEE ALSO:
       benchmark_data(3) benchmark_timestamp(3)	benchmark_tracedata(3)

system				  April	2025		   benchmark_enable(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=benchmark_enable&sektion=3&manpath=FreeBSD+Ports+14.3.quarterly>

home | help