Package com.smeup.kokos.sdk.rpgle.util
Class StatisticsFunTsvManager
java.lang.Object
com.smeup.kokos.sdk.rpgle.util.TsvManager
com.smeup.kokos.sdk.rpgle.util.StatisticsFunTsvManager
- All Implemented Interfaces:
AutoCloseable
The
StatisticsFunTsvManager class extends the TsvManager class
to manage and write statistics related to function executions in a Tab-Separated
Values (TSV) format. This class is specifically designed to record the execution
status of functions along with their timestamps and the number of statements executed.
The following columns are included in the TSV:
- COLUMN_TIMESTAMP: The timestamp of when the record was created.
- COLUMN_FUN: The name of the function being executed.
- COLUMN_EXECUTE: Indicates whether the function was executed successfully.
- COLUMN_STATEMENTS: The number of statements executed in the function.
This class uses a buffered writer to enhance performance when writing to the TSV.- Author:
- Davide Palladino
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStatisticsFunTsvManager(Writer writer, String fun, boolean isNew) Constructs a newStatisticsFunTsvManagerinstance. -
Method Summary
Methods inherited from class com.smeup.kokos.sdk.rpgle.util.TsvManager
append, close
-
Field Details
-
HEADER_TIMESTAMP
- See Also:
-
HEADER_FUN
- See Also:
-
HEADER_EXECUTE
- See Also:
-
HEADER_STATEMENTS
- See Also:
-
HEADER_WARNINGS
- See Also:
-
-
Constructor Details
-
StatisticsFunTsvManager
Constructs a newStatisticsFunTsvManagerinstance.- Parameters:
writer- the writer used to output the TSV data, which can be any implementation ofWriter, such as a buffered writerfun- the name of the function for which statistics are recordedisNew- a boolean indicating whether to initialize the TSV with headers
-
-
Method Details
-
append
Appends a new entry to the TSV with the execution status and number of statements.- Parameters:
executed- a boolean indicating whether the function was executed successfullynStatements- the number of statements executed in the function
-
getHeadersSerialized
-