Class PerformanceRecord
Monitoring Performance Records are returned in a list from
Smf110Record.performanceRecords()
Individual fields are extracted from the performance record by passing a
MonitoringField
to the getField(...)
method.
The MonitoringField classes define the specific fields to be retrieved.
A CICS Monitoring Dictionary is also required before fields can be retrieved. Dictionaries are
maintained automatically for each APPLID, but the record containing the dictionary must have been processed before you can call
getField(...)
.
You can use Smf110Record.haveDictionary()
to test whether
a dictionary is available for a specific CICS SMF record.
Specific fields are accessed by defining subclasses of
MonitoringFields
to define the specific field and type and accessing them like so:
ByteStringField transactionField = ByteStringField.define("DFHTASK","C001");
ClockField cpuField = ClockField.define("DFHTASK","S008");
try (SmfRecordReader reader =
SmfRecordReader.fromDD("INPUT"))
{
reader.include(110,1);
for (SmfRecord record : reader)
{
Smf110Record r110 = new Smf110Record(record);
if (r110.haveDictionary())
{
for (MonitoringPerformanceRecord mn : r110.performanceRecords())
{
String txName = mn.getField(transactionField);
double cpuTime = mn.getFieldTimerSeconds(cpuField);
// do stuff
}
}
}
}
-
Method Summary
Modifier and TypeMethodDescriptionstatic PerformanceRecord
create
(byte[] Data, int offset, int length, CicsInstanceId cicsInstance, Dictionary dictionary, MnProductSection mnProductSection, MnHeader mnHeader) create is intended for internal use only.elapsed()
Transaction elapsed time - the Duration between START and STOP times.double
Transaction elapsed time in seconds - the number of seconds between START and STOP times.getByteStringField
(DictionaryEntry dictionaryEntry) Get the value of a byte string field specified by aDictionaryEntry
as a String.Get an identifier for the CICS instance associated with this record - used to select a dictionarygetClockField
(DictionaryEntry dictionaryEntry) Get the value of a field specified by aDictionaryEntry
as a CicsClock.int
getClockFieldFlags
(DictionaryEntry dictionaryEntry) Deprecated.int
getClockFieldPeriodCount
(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
getClockFieldTimer
(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
long
getCountField
(DictionaryEntry dictionaryEntry) Get the value of a count field specified by aDictionaryEntry
as a long.long
getCountField2
(DictionaryEntry dictionaryEntry) Deprecated.long
getCountField4
(DictionaryEntry dictionaryEntry) Deprecated.long
getCountField8
(DictionaryEntry dictionaryEntry) Deprecated.getCountFieldAsBigInteger
(DictionaryEntry dictionaryEntry) Get the value of a count field specified by aDictionaryEntry
as a BigInteger.Get the dictionary for this record, if availablegetField
(DictionaryEntry dictionaryEntry) Get the value of a field specified by aDictionaryEntry
as an Object.getField
(ByteStringField field) Get the value of aByteStringField
as a String.getField
(ClockField field) Get the value of aClockField
as a CicsClock.long
getField
(CountField field) Get the value of aCountField
as a long.getField
(MonitoringField field) Get the value of any type ofMonitoringField
as an Object.long[]
getField
(MultiCountField field) Get the value of aMultiCountField
as an array of longs.long
getField
(PackedField field) Get the value of aPackedField
as a long.getField
(TimestampField field) Get the value of aTimestampField
as a ZonedDateTime.getFieldAsBigInteger
(CountField field) Get the value of aCountField
as a BigInteger.Get the value of aMultiCountField
as a List of BigIntegers.getFieldAsBigInteger
(PackedField field) Get the value of aPackedField
as a BigInteger.getFieldAsHex
(DictionaryEntry dictionaryEntry) Get the bytes of a field specified by aDictionaryEntry
as a hexadecimal String.getFieldAsHex
(MonitoringField field) Get the bytes of aMonitoringField
as a hexadecimal String.getFieldAsString
(DictionaryEntry dictionaryEntry) Get the value of a field specified by aDictionaryEntry
as a String.getFieldAsString
(MonitoringField field) Get the value of aMonitoringField
as a String.byte[]
getFieldBytes
(DictionaryEntry dictionaryEntry) Get the bytes of a field specified by aDictionaryEntry
as a byte array.byte[]
getFieldBytes
(MonitoringField field) Get the bytes of aMonitoringField
as a byte array.int
getFieldFlags
(ClockField field) Deprecated.use the values inCicsClock
fromgetField(ClockField)
int
getFieldPeriodCount
(ClockField field) Deprecated.use the values inCicsClock
fromgetField(ClockField)
getFieldTimer
(ClockField field) Deprecated.use the values inCicsClock
fromgetField(ClockField)
double
getFieldTimerSeconds
(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
double
getFieldTimerSeconds
(ClockField field) Deprecated.use the values inCicsClock
fromgetField(ClockField)
long[]
getMultiCountField
(DictionaryEntry dictionaryEntry) Get the value of aMultiCountField
specified by aDictionaryEntry
as an array of longs.getMultiCountFieldAsBigInteger
(DictionaryEntry dictionaryEntry) Get the value of aMultiCountField
specified by aDictionaryEntry
as a List of BigIntegers.long
getPackedField
(DictionaryEntry dictionaryEntry) Get the value of aPackedField
specified by aDictionaryEntry
as a long.getPackedFieldAsBigInteger
(DictionaryEntry dictionaryEntry) Get the value of aPackedField
specified by aDictionaryEntry
as a BigInteger.getTimestampField
(DictionaryEntry dictionaryEntry) Get the value of aTimestampField
specified by aDictionaryEntry
as a ZonedDateTime.boolean
haveEntry
(MonitoringField field) Check whether we have a Dictionary Entry for a field identifierboolean
isValidPacked
(DictionaryEntry dictionaryEntry) Check whether thePackedField
specified by aDictionaryEntry
contains a valid packed decimal number.boolean
isValidPacked
(PackedField field) Check whether thePackedField
contains a valid packed decimal number.boolean
isZero
(DictionaryEntry dictionaryEntry) Check whether a field specified by aDictionaryEntry
is all zeros ie doesn't contain data or the value is zero.boolean
isZero
(MonitoringField field) Check whether a field is all zeros ie doesn't contain data or the value is zero.smfmndto()
SMFMNDTO as ZoneOffset.smfmnjbn()
SMFMNJBN value.smfmnprn()
SMFMNPRN value.smfmnsid()
SMFMNSID value.smfmnspn()
SMFMNSPN value.toString()
Methods inherited from class com.blackhillsoftware.smf.SmfData
createSection, getTriplet
-
Method Details
-
create
public static PerformanceRecord create(byte[] Data, int offset, int length, CicsInstanceId cicsInstance, Dictionary dictionary, MnProductSection mnProductSection, MnHeader mnHeader) create is intended for internal use only. Instances of this section are created by the parent record or section.- Parameters:
Data
- Array of bytes containing data for this sectionoffset
- Offset of this section in the datalength
- length of the section
-
smfmnsid
SMFMNSID value.- Returns:
- String SMFMNSID value
-
smfmnprn
SMFMNPRN value.- Returns:
- String SMFMNPRN value
-
smfmnspn
SMFMNSPN value.- Returns:
- String SMFMNSPN value
-
smfmnjbn
SMFMNJBN value.- Returns:
- String SMFMNJBN value
-
smfmndto
SMFMNDTO as ZoneOffset.- Returns:
- ZoneOffset SMFMNDTO
-
haveEntry
Check whether we have a Dictionary Entry for a field identifier- Parameters:
field
- a field (ClockField, CountField etc.)- Returns:
- boolean true if there is a dictionary entry for the field
- See Also:
-
isZero
Check whether a field is all zeros ie doesn't contain data or the value is zero. If you already have the DictionaryEntry for the field useisZero(DictionaryEntry)
- Parameters:
field
- theMonitoringField
to check- Returns:
- true if all bytes are zero
-
isZero
Check whether a field specified by aDictionaryEntry
is all zeros ie doesn't contain data or the value is zero.- Parameters:
dictionaryEntry
- theDictionaryEntry
to check- Returns:
- true if all bytes are zero
-
getField
Get the value of a field specified by aDictionaryEntry
as an Object. The Object type returned depends on the specific field type- CountField: BigInteger
- ByteStringField: String
- ClockField: CicsClock
- PackedField: BigInteger
- TimestampField: ZonedDateTime
- MultiCountField: List of BigInteger
- Parameters:
dictionaryEntry
- theDictionaryEntry
for the specific field- Returns:
- Object field value
-
getField
Get the value of any type ofMonitoringField
as an Object. The Object type returned depends on the specific MonitoringField type- CountField: BigInteger
- ByteStringField: String
- ClockField: CicsClock
- PackedField: BigInteger
- TimestampField: ZonedDateTime
- MultiCountField: List of BigInteger
- Parameters:
field
- theMonitoringField
defining the specific field- Returns:
- Object field value
-
elapsed
Transaction elapsed time - the Duration between START and STOP times.- Returns:
- Duration Elapsed time.
-
elapsedSeconds
public double elapsedSeconds()Transaction elapsed time in seconds - the number of seconds between START and STOP times.- Returns:
- double Elapsed time
-
getField
Get the value of aCountField
as a long. The field will be converted from 2, 4 or 8 bytes as appropriate. If the value of the field might exceed the maximum value of a signed 64 bit integer, usegetFieldAsBigInteger(CountField)
. If you have theDictionaryEntry
already, you can usegetCountField(DictionaryEntry)
.- Parameters:
field
- theCountField
defining the specific field- Returns:
- long field value
-
getCountField
Get the value of a count field specified by aDictionaryEntry
as a long. The field will be converted from 2, 4 or 8 bytes according to the field length. If the value of the field might exceed the maximum value of a signed 64 bit integer, usegetCountFieldAsBigInteger(DictionaryEntry)
.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long field value
-
getCountField2
Deprecated.Get the value of a 2 byte count fieldDictionaryEntry
as a long.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long field value
-
getCountField4
Deprecated.Get the value of a 4 byte count fieldDictionaryEntry
as a long.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long field value
-
getCountField8
Deprecated.Get the value of a 8 byte count fieldDictionaryEntry
as a long.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long field value
-
getFieldAsBigInteger
Get the value of aCountField
as a BigInteger. The field will be converted from 4 or 8 bytes as appropriate. If the value of the field will not exceed the maximum value of a signed 64 bit integer, the long value returned bygetField(CountField)
may provide better performance If you already have theDictionaryEntry
you can usegetCountFieldAsBigInteger(DictionaryEntry)
- Parameters:
field
- theCountField
defining the specific field- Returns:
- BigInteger field value
-
getCountFieldAsBigInteger
Get the value of a count field specified by aDictionaryEntry
as a BigInteger. The field will be converted from 4 or 8 bytes as appropriate. If the value of the field will not exceed the maximum value of a signed 64 bit integer, the long value returned bygetCountField(DictionaryEntry)
may provide better performance- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field
-
getField
Get the value of aMultiCountField
as an array of longs. The number of items in the array will be the field length divided by 8. If the values of the field might exceed the maximum value of a signed 64 bit integer, usegetFieldAsBigInteger(MultiCountField)
. If you already have the DictionaryEntry, you can usegetMultiCountField(DictionaryEntry)
- Parameters:
field
- theMultiCountField
defining the specific field- Returns:
- long[] field values
-
getMultiCountField
Get the value of aMultiCountField
specified by aDictionaryEntry
as an array of longs. The number of items in the array will be the field length divided by 8. If the values of the field might exceed the maximum value of a signed 64 bit integer, usegetFieldAsBigInteger(MultiCountField)
.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long[] field values
-
getFieldAsBigInteger
Get the value of aMultiCountField
as a List of BigIntegers. The number of items in the list will be the field length divided by 8. If you already have the DictionaryEntry, you can usegetMultiCountFieldAsBigInteger(DictionaryEntry)
- Parameters:
field
- theMultiCountField
defining the specific field- Returns:
- List<BigInteger> field values
-
getMultiCountFieldAsBigInteger
Get the value of aMultiCountField
specified by aDictionaryEntry
as a List of BigIntegers. The number of items in the list will be the field length divided by 8.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- List<BigInteger> field values
-
getField
Get the value of aByteStringField
as a String. If you already have theDictionaryEntry
, you can usegetByteStringField(DictionaryEntry)
- Parameters:
field
- theByteStringField
defining the specific field- Returns:
- String field value
-
getByteStringField
Get the value of a byte string field specified by aDictionaryEntry
as a String.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- String field value
-
isValidPacked
Check whether thePackedField
contains a valid packed decimal number. If you already have theDictionaryEntry
, you can useisValidPacked(DictionaryEntry)
- Parameters:
field
- thePackedField
defining the specific field- Returns:
- String field value
-
isValidPacked
Check whether thePackedField
specified by aDictionaryEntry
contains a valid packed decimal number.- Parameters:
dictionaryEntry
- thePackedField
defining the specific field- Returns:
- String field value
-
getField
Get the value of aPackedField
as a long. If the number of digits exceeds 17, usegetFieldAsBigInteger(PackedField)
If you already have theDictionaryEntry
, you can usegetPackedField(DictionaryEntry)
- Parameters:
field
- thePackedField
defining the specific field- Returns:
- long field value
-
getPackedField
Get the value of aPackedField
specified by aDictionaryEntry
as a long. If the number of digits exceeds 17, usegetPackedFieldAsBigInteger(DictionaryEntry)
- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- long field value
-
getFieldAsBigInteger
Get the value of aPackedField
as a BigInteger. If you already have theDictionaryEntry
, you can usegetPackedFieldAsBigInteger(DictionaryEntry)
- Parameters:
field
- thePackedField
defining the specific field- Returns:
- BigInteger field value
-
getPackedFieldAsBigInteger
Get the value of aPackedField
specified by aDictionaryEntry
as a BigInteger.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- BigInteger field value
-
getFieldAsString
Get the value of aMonitoringField
as a String.- Parameters:
field
- theMonitoringField
defining the specific field- Returns:
- String field value
-
getFieldAsString
Get the value of a field specified by aDictionaryEntry
as a String.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- String field value
-
getFieldBytes
Get the bytes of aMonitoringField
as a byte array. If you already have theDictionaryEntry
, you can usegetFieldBytes(DictionaryEntry)
- Parameters:
field
- theMonitoringField
defining the specific field- Returns:
- byte[] the field bytes
-
getFieldBytes
Get the bytes of a field specified by aDictionaryEntry
as a byte array.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- byte[] the field bytes
-
getFieldAsHex
Get the bytes of aMonitoringField
as a hexadecimal String.- Parameters:
field
- theMonitoringField
defining the specific field- Returns:
- String field hexadecimal bytes
-
getFieldAsHex
Get the bytes of a field specified by aDictionaryEntry
as a hexadecimal String.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- String field hexadecimal bytes
-
getField
Get the value of aTimestampField
as a ZonedDateTime. If you already have theDictionaryEntry
, you can usegetTimestampField(DictionaryEntry)
- Parameters:
field
- theTimestampField
defining the specific field- Returns:
- ZonedDateTime field value
-
getTimestampField
Get the value of aTimestampField
specified by aDictionaryEntry
as a ZonedDateTime.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- ZonedDateTime field value
-
getField
Get the value of aClockField
as a CicsClock. If you have theDictionaryEntry
already, you can usegetClockField(DictionaryEntry)
.- Parameters:
field
- theClockField
defining the specific field- Returns:
- CicsClock field value
-
getClockField
Get the value of a field specified by aDictionaryEntry
as a CicsClock.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- CicsClock field value
-
getFieldTimer
Deprecated.use the values inCicsClock
fromgetField(ClockField)
Get the value of the timer portion of aClockField
as a Duration. The value is also available as a double in seconds, which may be more useful for calculations. SeegetFieldTimerSeconds(ClockField)
.- Parameters:
field
- theClockField
defining the specific field- Returns:
- Duration field value as a Duration
-
getClockFieldTimer
Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
Get the value of the timer portion of a clock field specified by aDictionaryEntry
as a Duration. The value is also available as a double in seconds, which may be more useful for calculations. SeegetFieldTimerSeconds(DictionaryEntry)
.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- Duration field value as a Duration
-
getFieldTimerSeconds
Deprecated.use the values inCicsClock
fromgetField(ClockField)
Get the value of the timer portion of aClockField
in seconds.- Parameters:
field
- theClockField
defining the specific field- Returns:
- double field value in seconds
-
getFieldTimerSeconds
Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
Get the value of the timer portion of a clock field specified by aDictionaryEntry
in seconds.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- double field value in seconds
-
getFieldFlags
Deprecated.use the values inCicsClock
fromgetField(ClockField)
Get the 8 reserved flag bits of a CICSClockField
. Returned as an integer with the bit values in the last 8 bits.- Parameters:
field
- theClockField
defining the specific field- Returns:
- int field value
-
getClockFieldFlags
Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
Get the 8 reserved flag bits of a CICS clock field specified by aDictionaryEntry
. Returned as an integer with the bit values in the last 8 bits.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- int field value
-
getFieldPeriodCount
Deprecated.use the values inCicsClock
fromgetField(ClockField)
Get the period count of a CICSClockField
.- Parameters:
field
- theClockField
defining the specific field- Returns:
- int field value
-
getClockFieldPeriodCount
Deprecated.use the values inCicsClock
fromgetClockField(DictionaryEntry)
Get the period count of a CICS clock field specified by aDictionaryEntry
.- Parameters:
dictionaryEntry
- theDictionaryEntry
defining the specific field- Returns:
- int field value
-
getDictionary
Get the dictionary for this record, if available- Returns:
- a Dictionary or null
-
getCicsInstanceId
Get an identifier for the CICS instance associated with this record - used to select a dictionary- Returns:
- the CicsInstanceId
-
toString
-
CicsClock
fromgetClockField(DictionaryEntry)