haxl-2.4.0.0: A Haskell library for efficient, concurrent, and concise data access.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Haxl.Core.Flags

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

Report flags

data ReportFlag Source #

Constructors

ReportOutgoneFetches

outgone fetches, for debugging eg: timeouts

ReportFetchStats

data fetch stats & errors

ReportProfiling

enabling label stack and profiling

ReportExceptionLabelStack

include label stack in HaxlException

ReportFetchStack

log cost-center stack traces of dataFetch calls

data ReportFlags Source #

Instances

Instances details
Show ReportFlags Source # 
Instance details

Defined in Haxl.Core.Flags

Flags

data Flags Source #

Flags that control the operation of the engine.

Constructors

Flags 

Fields

  • trace :: !Int

    Tracing level (0 = quiet, 3 = very verbose).

  • report :: !ReportFlags

    Report flags

  • caching :: !Int

    Non-zero if caching is enabled. If caching is disabled, then we still do batching and de-duplication, but do not cache results.

  • recording :: !Int

    Non-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 -> ReportFlag -> m a -> m () Source #

Runs an action if the ReportFlag is set.

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