java.lang.Object
com.powsybl.computation.mpi.CsvMpiStatistics
- All Implemented Interfaces:
MpiStatistics
,AutoCloseable
- Author:
- Geoffroy Jamgotchian <geoffroy.jamgotchian at rte-france.com>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
static void
exportBusyCores
(Path dbDir, String dbName) static void
exportCommonFileTransferDuration
(Path dbDir, String dbName) static void
exportTaskCount
(Path dbDir, String dbName) void
exportTasksToCsv
(Writer writer) Export tasks statistics to CSV.static void
exportWorkingDataSize
(Path dbDir, String dbName) void
logCommonFileTransfer
(String fileName, int chunk, long size, long duration) Log a common file transfer.void
logJobEnd
(int jobId) Log a job end.void
logJobStart
(int jobId, String commandId, Map<String, String> tags) Log a job start.void
logTaskEnd
(int taskId, long taskDuration, List<Long> commandsDuration, long dataTransferDuration, long outputMessageSize, long workingDataSize, int exitCode) Log a task end.void
logTaskStart
(int taskId, int jobId, int taskIndex, ZonedDateTime startTime, int slaveRank, int slaveThread, long inputMessageSize) Log a task start.
-
Constructor Details
-
CsvMpiStatistics
- Throws:
IOException
-
-
Method Details
-
logCommonFileTransfer
Description copied from interface:MpiStatistics
Log a common file transfer.- Specified by:
logCommonFileTransfer
in interfaceMpiStatistics
- Parameters:
fileName
- the file namechunk
- chunk numbersize
- file size in bytesduration
- duration of the transfer in ms
-
logJobStart
Description copied from interface:MpiStatistics
Log a job start.- Specified by:
logJobStart
in interfaceMpiStatistics
- Parameters:
jobId
- the job idcommandId
- the command idtags
- tags associated to the job
-
logJobEnd
public void logJobEnd(int jobId) Description copied from interface:MpiStatistics
Log a job end.- Specified by:
logJobEnd
in interfaceMpiStatistics
- Parameters:
jobId
- the job id
-
logTaskStart
public void logTaskStart(int taskId, int jobId, int taskIndex, ZonedDateTime startTime, int slaveRank, int slaveThread, long inputMessageSize) Description copied from interface:MpiStatistics
Log a task start.- Specified by:
logTaskStart
in interfaceMpiStatistics
- Parameters:
taskId
- the task idjobId
- the job idtaskIndex
- index of the task in the jobstartTime
- task start timeslaveRank
- slave rank that has managed the taskslaveThread
- slave thread that has managed the taskinputMessageSize
- input message size in bytes
-
logTaskEnd
public void logTaskEnd(int taskId, long taskDuration, List<Long> commandsDuration, long dataTransferDuration, long outputMessageSize, long workingDataSize, int exitCode) Description copied from interface:MpiStatistics
Log a task end.- Specified by:
logTaskEnd
in interfaceMpiStatistics
- Parameters:
taskId
- the task idtaskDuration
- task duration in mscommandsDuration
- duration in ms of all commands of the taskdataTransferDuration
- part of the task duration corresponding to data transfer in msoutputMessageSize
- output message size in bytesworkingDataSize
- working data size in bytes on slave sideexitCode
- exit code of the command
-
exportTasksToCsv
Description copied from interface:MpiStatistics
Export tasks statistics to CSV.- Specified by:
exportTasksToCsv
in interfaceMpiStatistics
-
exportCommonFileTransferDuration
- Throws:
IOException
-
exportTaskCount
- Throws:
IOException
-
exportBusyCores
- Throws:
IOException
-
exportWorkingDataSize
- Throws:
IOException
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMpiStatistics
-