haxl-2.0.1.1: A Haskell library for efficient, concurrent, and concise data access.

Haxl.Core.Flags

Contents

Description

The Flags type and related functions. This module is provided for access to Haxl internals only; most users should import Haxl.Core instead.

Synopsis

# Tracing flags

data Flags Source #

Flags that control the operation of the engine.

Constructors

 Flags Fieldstrace :: !IntTracing level (0 = quiet, 3 = very verbose).report :: !IntReport level: * 0 = quiet * 1 = quiet (legacy, this used to do something) * 2 = data fetch stats & errors * 3 = (same as 2, this used to enable errors) * 4 = profiling * 5 = log stack traces of dataFetch callscaching :: !IntNon-zero if caching is enabled. If caching is disabled, then we still do batching and de-duplication, but do not cache results.recording :: !IntNon-zero if recording is enabled. This allows tests to record cache calls for datasources by making uncachedRequest behave like dataFetch

ifTrace :: Monad m => Flags -> Int -> m a -> m () Source #

Runs an action if the tracing level is above the given threshold.

ifReport :: Monad m => Flags -> Int -> m a -> m () Source #

Runs an action if the report level is above the given threshold.

ifProfiling :: Monad m => Flags -> m a -> m () Source #