Class PerformanceTracker
- java.lang.Object
-
- org.nd4j.linalg.api.ops.performance.PerformanceTracker
-
public class PerformanceTracker extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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()
-
-
-
Method Detail
-
getInstance
public static PerformanceTracker getInstance()
-
addMemoryTransaction
public long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes)
This method stores bandwidth used for given transaction. PLEASE NOTE: Bandwidth is stored in per millisecond value.- Parameters:
deviceId
- device used for this transactiontimeSpent
- time spent on this transaction in nanosecondsnumberOfBytes
- number of bytes
-
addMemoryTransaction
public long addMemoryTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)
This method stores bandwidth used for given transaction. PLEASE NOTE: Bandwidth is stored in per millisecond value.- Parameters:
deviceId
- device used for this transactiontimeSpent
- time spent on this transaction in nanosecondsnumberOfBytes
- number of bytesdirection
- direction for the given memory transaction
-
clear
public void clear()
-
helperStartTransaction
public long helperStartTransaction()
-
helperRegisterTransaction
public void helperRegisterTransaction(int deviceId, long timeSpentNanos, long numberOfBytes, @NonNull @NonNull MemcpyDirection direction)
-
getCurrentBandwidth
public Map<Integer,Map<MemcpyDirection,Long>> getCurrentBandwidth()
-
-