Table of Contents

Class ResourceMeter

Namespace
DotBoxD.Kernels.Model
Assembly
DotBoxD.Kernels.dll
public sealed class ResourceMeter
Inheritance
ResourceMeter
Inherited Members

Constructors

ResourceMeter(ResourceLimits)

public ResourceMeter(ResourceLimits limits)

Parameters

limits ResourceLimits

Properties

AllocatedBytes

public long AllocatedBytes { get; }

Property Value

long

CollectionElements

public long CollectionElements { get; }

Property Value

long

FileBytesRead

public long FileBytesRead { get; }

Property Value

long

FileBytesWritten

public long FileBytesWritten { get; }

Property Value

long

FuelUsed

public long FuelUsed { get; }

Property Value

long

HostCalls

public int HostCalls { get; }

Property Value

int

Limits

public ResourceLimits Limits { get; }

Property Value

ResourceLimits

LogEvents

public int LogEvents { get; }

Property Value

int

LoopIterations

public long LoopIterations { get; }

Property Value

long

NetworkBytesRead

public long NetworkBytesRead { get; }

Property Value

long

NetworkBytesWritten

public long NetworkBytesWritten { get; }

Property Value

long

StringBytes

public long StringBytes { get; }

Property Value

long

Methods

ChargeAllocation(long)

public void ChargeAllocation(long bytes)

Parameters

bytes long

ChargeCollection(SandboxValue)

public void ChargeCollection(SandboxValue value)

Parameters

value SandboxValue

ChargeCollection(SandboxValue, CancellationToken)

public void ChargeCollection(SandboxValue value, CancellationToken cancellationToken)

Parameters

value SandboxValue
cancellationToken CancellationToken

ChargeFileRead(long)

public void ChargeFileRead(long bytes)

Parameters

bytes long

ChargeFileWrite(long)

public void ChargeFileWrite(long bytes)

Parameters

bytes long

ChargeFuel(long)

public void ChargeFuel(long amount)

Parameters

amount long

ChargeHostCall(string, int?)

public void ChargeHostCall(string bindingId, int? maxCallsPerRun = null)

Parameters

bindingId string
maxCallsPerRun int?

ChargeLogEvent(string)

public void ChargeLogEvent(string message)

Parameters

message string

ChargeLoopIteration(long)

public void ChargeLoopIteration(long fuelAmount)

Parameters

fuelAmount long

ChargeLoopIterations(long, long)

public void ChargeLoopIterations(long iterations, long fuelPerIteration)

Parameters

iterations long
fuelPerIteration long

ChargeNetworkRead(long)

public void ChargeNetworkRead(long bytes)

Parameters

bytes long

ChargeNetworkWrite(long)

public void ChargeNetworkWrite(long bytes)

Parameters

bytes long

ChargeString(string)

public void ChargeString(string value)

Parameters

value string

ChargeStringAllocation(int)

public void ChargeStringAllocation(int charLength)

Parameters

charLength int

ChargeValue(SandboxValue)

public void ChargeValue(SandboxValue value)

Parameters

value SandboxValue

ChargeValue(SandboxValue, CancellationToken)

public void ChargeValue(SandboxValue value, CancellationToken cancellationToken)

Parameters

value SandboxValue
cancellationToken CancellationToken

CheckDeadline()

public void CheckDeadline()

RemainingWallTime()

public TimeSpan RemainingWallTime()

Returns

TimeSpan

Snapshot()

public SandboxResourceUsage Snapshot()

Returns

SandboxResourceUsage