Enums

enum ExplicitGcType

public enum ExplicitGcType <: ToString {
    Disabled |
    Heavy |
    Light
}

Description: Specifies explicitGC configuration parameters for the @Configure macro. Indicates three GC execution methods.

Parent types:

Disabled

Disabled

Description: Indicates that GC is not explicitly called by the framework.

Heavy

Heavy

Description: Indicates that std.runtime.GC(heavy: true) is explicitly called by the framework during the execution of performance tests.

Light

Light

Description: Indicates that std.runtime.GC(heavy: false) is explicitly called by the framework during the execution of the benchmark function. This is the default setting.

func toString()

public override func toString(): String

Description: Returns a string representing the three GC execution methods.

Returns:

  • String: string representing the three GC execution methods

enum TimeUnit

public enum TimeUnit {
    | Micros
    | Millis
    | Nanos
    | Seconds
}

Description: Specifies the time unit that can be used in the TimeNow constructor.

Micros

Micros

Description: Specifies the unit microsecond.

Millis

Millis

Description: Specifies the unit millisecond.

Nanos

Nanos

Description: Specifies the unit nanosecond.

Seconds

Seconds

Description: Specifies the unit second.

enum PerfCounter

public enum PerfCounter <: ToString {
    | HW_CPU_CYCLES
    | HW_INSTRUCTIONS
    | HW_CACHE_REFERENCES
    | HW_CACHE_MISSES
    | HW_BRANCH_INSTRUCTIONS
    | HW_BRANCH_MISSES
    | HW_BUS_CYCLES
    | HW_STALLED_CYCLES_FRONTEND
    | HW_STALLED_CYCLES_BACKEND
    | HW_REF_CPU_CYCLES
    | SW_CPU_CLOCK
    | SW_TASK_CLOCK
    | SW_PAGE_FAULTS
    | SW_CONTEXT_SWITCHES
    | SW_CPU_MIGRATIONS
    | SW_PAGE_FAULTS_MIN
    | SW_PAGE_FAULTS_MAJ
    | SW_EMULATION_FAULTS
}

Description: Enumerates the CPU counters supported by the Perf constructor. For more information about specific CPU counters, see the document perf_event_open about system calls in the Linux kernel.

Parent types:

HW_CPU_CYCLES

HW_CPU_CYCLES

Description: Specifies the number of raw CPU cycles.

HW_INSTRUCTIONS

HW_INSTRUCTIONS

Description: Specifies the number of decommissioned CPU instructions.

HW_CACHE_REFERENCES

HW_CACHE_REFERENCES

Description: Specifies the number of cache access times.

HW_CACHE_MISSES

HW_CACHE_MISSES

Description: Specifies the number of cache misses.

HW_BRANCH_INSTRUCTIONS

HW_BRANCH_INSTRUCTIONS

Description: Specifies the number of decommissioned branch CPU instructions.

HW_BRANCH_MISSES

HW_BRANCH_MISSES

Description: Specifies the number of branch prediction failures.

HW_BUS_CYCLES

HW_BUS_CYCLES

Description: Specifies the number of bus cycles.

HW_STALLED_CYCLES_FRONTEND

HW_STALLED_CYCLES_FRONTEND

Description: Specifies the number of CPU cycles wasted on waiting at the frontend of the CPU pipe.

HW_STALLED_CYCLES_BACKEND

HW_STALLED_CYCLES_BACKEND

Description: Specifies the number of CPU cycles wasted on waiting at the backend of the CPU pipe.

HW_REF_CPU_CYCLES

HW_REF_CPU_CYCLES

Description: Specifies the number of CPU cycles irrelevant to frequency.

SW_CPU_CLOCK

SW_CPU_CLOCK

Description: Specifies the time of each CPU clock.

SW_TASK_CLOCK

SW_TASK_CLOCK

Description: Specifies the time of the CPU clock for each task.

SW_PAGE_FAULTS

SW_PAGE_FAULTS

Description: Specifies the number of page errors.

SW_CONTEXT_SWITCHES

SW_CONTEXT_SWITCHES

Description: Specifies the number of OS context switches.

SW_CPU_MIGRATIONS

SW_CPU_MIGRATIONS

Description: Specifies the number of tasks migrated between CPUs.

SW_PAGE_FAULTS_MIN

SW_PAGE_FAULTS_MIN

Description: Specifies the number of minor page errors.

SW_PAGE_FAULTS_MAJ

SW_PAGE_FAULTS_MAJ

Description: Specifies the number of major page errors.

SW_EMULATION_FAULTS

SW_EMULATION_FAULTS

Description: Specifies the number of unsupported instructions that need to be simulated in the kernel.