Skip to main content
`Ctrl`+`K`

# PetscBenchSetType

set the type of `PetscBench` benchmark to run

## Synopsis

    #include "petscbm.h"
    PetscErrorCode PetscBenchSetType(PetscBench bm, PetscBenchType type)

Collective

## Input Parameters

- bm - the `PetscBench`

- type - a known method

## Options Database Key

- -bm_type type - Sets `PetscBench` type

## Developer Note

`PetscBenchRegister()` is used to add new benchmark types

## See Also

`PetscBench`, `PetscBenchSetFromOptions()`, `PetscBenchRun()`, `PetscBenchViewFromOptions()`, `PetscBenchDestroy()`, `PetscBenchSetUp()`, `PetscBenchGetSize()`, `PetscBenchSetOptionsPrefix()`, `PetscBenchSetSize()`, `PetscBenchGetType()`, `PetscBenchCreate()`

## Level

advanced

## Location

src/sys/classes/bm/interface/bm.c

Index of all BM routines
Table of Contents for all manual pages
Index of all manual pages