benchutil

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListSchemaWithXItems

func ListSchemaWithXItems(x int) graphql.Schema

func WideArgedSchemaQueryWithLiteral

func WideArgedSchemaQueryWithLiteral(x int, literal string) string

WideArgedSchemaQueryWithLiteral returns a query identical in shape to WideArgedSchemaQueryWithVariable except each `value` arg is a distinct literal string. Used to demonstrate the cost when clients don't use variables — every literal change forces a fresh parse+validate+plan.

func WideArgedSchemaQueryWithVariable

func WideArgedSchemaQueryWithVariable(x int) string

WideArgedSchemaQueryWithVariable returns a parametric query: every field's `value` arg is bound to the same variable `$v`. The resulting *Plan can be cached once and reused for arbitrary literal variations passed as Args at execute time.

func WideArgedSchemaWithXFieldsAndYItems

func WideArgedSchemaWithXFieldsAndYItems(x int, y int) graphql.Schema

WideArgedSchemaWithXFieldsAndYItems is the same shape as WideSchemaWithXFieldsAndYItems but every field takes a `value: String` argument the resolver echoes (or, for non-string fields, ignores). Designed to exercise the parametric-query path: a single `value: $v` variable can fan out across all 100 fields, so a cached plan handles arbitrary literal variations via Args alone.

func WideSchemaQuery

func WideSchemaQuery(x int) string

func WideSchemaResolveAppendWithXFieldsAndYItems

func WideSchemaResolveAppendWithXFieldsAndYItems(x int, y int) graphql.Schema

WideSchemaResolveAppendWithXFieldsAndYItems mirrors WideSchemaWithXFieldsAndYItems but every leaf field uses ResolveAppend (writes JSON bytes directly) instead of Resolve. The per-field output is identical, but the executor skips the Serialize / leafEmitter / boxing chain entirely.

func WideSchemaWithXFieldsAndYItems

func WideSchemaWithXFieldsAndYItems(x int, y int) graphql.Schema

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL