package b0

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Cpu.TimeSource

Measuring CPU user and system time.

CPU time spans

Sourcetype span

The type for CPU execution time spans.

Sourceval span : utime:Mtime.span -> stime:Mtime.span -> children_utime:Mtime.span -> children_stime:Mtime.span -> span

span ~utime ~stime ~children_utime ~children_stime is a cpu span with the given fields. See accessors for semantics.

Sourceval zero : span

zero is zero CPU times.

Sourceval utime : span -> Mtime.span

utime cpu is cpu's user time.

Sourceval stime : span -> Mtime.span

stime cpu is cpu's system time.

Sourceval children_utime : span -> Mtime.span

children_utime cpu is cpu's user time for children processes.

Sourceval children_stime : span -> Mtime.span

children_stime cpu is cpu's system time for children processes.

CPU time counters

Sourcetype counter

The type for CPU time counters.

Sourceval counter : unit -> counter

counter () is a counter counting from now on.

Sourceval count : counter -> span

count c are CPU times since c was created.