lumilio-web / utils/smartBatchSizing / SmartBatchSizer
Class: SmartBatchSizer
Defined in: utils/smartBatchSizing.ts:145
Smart Batch Sizing Manager Maintains performance history and adapts batch sizes dynamically
Constructors
Constructor
new SmartBatchSizer():
SmartBatchSizer
Defined in: utils/smartBatchSizing.ts:151
Returns
SmartBatchSizer
Methods
getDeviceCapabilities()
getDeviceCapabilities():
DeviceCapabilities
Defined in: utils/smartBatchSizing.ts:363
Gets device capabilities
Returns
getOptimalBatchSize()
getOptimalBatchSize(
operationType,totalItems,priority):number
Defined in: utils/smartBatchSizing.ts:158
Gets the optimal batch size for a given operation type and priority
Parameters
operationType
string
totalItems
number
priority
ProcessingPriority = ProcessingPriority.NORMAL
Returns
number
isMemoryPressureDetected()
isMemoryPressureDetected():
boolean
Defined in: utils/smartBatchSizing.ts:224
Checks if memory pressure is detected
Returns
boolean
recordMetrics()
recordMetrics(
metrics):void
Defined in: utils/smartBatchSizing.ts:202
Records processing metrics for future batch size optimization
Parameters
metrics
Returns
void
resetMetrics()
resetMetrics():
void
Defined in: utils/smartBatchSizing.ts:370
Resets metrics history (useful for testing or configuration changes)
Returns
void
