public class ResourceModelStatistics extends Object
ResourceModel
.
This implementation is intentionally not thread-safe, i.e. the calculations will loose accuracy in case the
statics are modified concurrently. This is intended: We can give up some precision in favor of a massive performance gain,
as this model is accessed hundreds of times per request, e.g. during page rendering.Modifier and Type | Method and Description |
---|---|
ResourceModelStatistics |
countCacheHit()
Increment the number of cache hits for this model.
|
ResourceModelStatistics |
countInstantiation()
Increments the number of times the resource model was instantiated.
|
ResourceModelStatistics |
countMappingDuration(int durationInMs)
Adds the mapping with the duration to the statistics.
|
ResourceModelStatistics |
countSubsequentMapping()
Increments the number of subsequent mappings.
|
public ResourceModelStatistics countInstantiation()
public ResourceModelStatistics countSubsequentMapping()
public ResourceModelStatistics countCacheHit()
public ResourceModelStatistics countMappingDuration(int durationInMs)
Copyright © 2024. All rights reserved.