This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add the stopwatch.stp tapset


William Cohen <wcohen@redhat.com> writes:

> The stopwatch.stp tapset provides multiple, independent timers to user
> scripts.  Stopwatches can be created by the user script at
> anytime. [...]

Might you consider a somewhat simpler API?

function start_stopwatch (name:string) { }
function stop_stopwatch (name:string) { }
function read_stopwatch_ns:long (name:string) { }
function read_stopwatch_us:long (name:string) { }
function read_stopwatch_ms:long (name:string) { }
function read_stopwatch_s:long (name:string) { }

i.e., no explicit create (the tapset can create it on first encounter
of a new name), no enums (encode start/stop as distinct functions),
and explicit reader functions.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]