public class PerformanceTracker extends Object
Modifier and Type | Method and Description |
---|---|
long |
addMemoryTransaction(int deviceId,
long timeSpentNanos,
long numberOfBytes)
This method stores bandwidth used for given transaction.
|
long |
addMemoryTransaction(int deviceId,
long timeSpentNanos,
long numberOfBytes,
@NonNull MemcpyDirection direction)
This method stores bandwidth used for given transaction.
|
void |
clear() |
Map<Integer,Map<MemcpyDirection,Long>> |
getCurrentBandwidth() |
static PerformanceTracker |
getInstance() |
void |
helperRegisterTransaction(int deviceId,
long timeSpentNanos,
long numberOfBytes,
@NonNull MemcpyDirection direction) |
long |
helperStartTransaction() |
public static PerformanceTracker getInstance()
public long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes)
deviceId
- device used for this transactiontimeSpent
- time spent on this transaction in nanosecondsnumberOfBytes
- number of bytespublic long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)
deviceId
- device used for this transactiontimeSpent
- time spent on this transaction in nanosecondsnumberOfBytes
- number of bytesdirection
- direction for the given memory transactionpublic void clear()
public long helperStartTransaction()
public void helperRegisterTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)
public Map<Integer,Map<MemcpyDirection,Long>> getCurrentBandwidth()
Copyright © 2020. All rights reserved.