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 PerformanceRecordcreate(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.doubleTransaction 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 aDictionaryEntryas 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 aDictionaryEntryas a CicsClock.intgetClockFieldFlags(DictionaryEntry dictionaryEntry) Deprecated.intgetClockFieldPeriodCount(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)getClockFieldTimer(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)longgetCountField(DictionaryEntry dictionaryEntry) Get the value of a count field specified by aDictionaryEntryas a long.longgetCountField2(DictionaryEntry dictionaryEntry) Deprecated.longgetCountField4(DictionaryEntry dictionaryEntry) Deprecated.longgetCountField8(DictionaryEntry dictionaryEntry) Deprecated.getCountFieldAsBigInteger(DictionaryEntry dictionaryEntry) Get the value of a count field specified by aDictionaryEntryas a BigInteger.Get the dictionary for this record, if availablegetField(DictionaryEntry dictionaryEntry) Get the value of a field specified by aDictionaryEntryas an Object.getField(ByteStringField field) Get the value of aByteStringFieldas a String.getField(ClockField field) Get the value of aClockFieldas a CicsClock.longgetField(CountField field) Get the value of aCountFieldas a long.getField(MonitoringField field) Get the value of any type ofMonitoringFieldas an Object.long[]getField(MultiCountField field) Get the value of aMultiCountFieldas an array of longs.longgetField(PackedField field) Get the value of aPackedFieldas a long.getField(TimestampField field) Get the value of aTimestampFieldas a ZonedDateTime.getField(TrannumField field) Get the value of aTrannumFieldas an Object, either Integer or String depending whether the value is a valid packed field.getFieldAsBigInteger(CountField field) Get the value of aCountFieldas a BigInteger.Get the value of aMultiCountFieldas a List of BigIntegers.getFieldAsBigInteger(PackedField field) Get the value of aPackedFieldas a BigInteger.getFieldAsHex(DictionaryEntry dictionaryEntry) Get the bytes of a field specified by aDictionaryEntryas a hexadecimal String.getFieldAsHex(MonitoringField field) Get the bytes of aMonitoringFieldas a hexadecimal String.getFieldAsString(DictionaryEntry dictionaryEntry) Get the value of a field specified by aDictionaryEntryas a String.getFieldAsString(MonitoringField field) Get the value of aMonitoringFieldas a String.byte[]getFieldBytes(DictionaryEntry dictionaryEntry) Get the bytes of a field specified by aDictionaryEntryas a byte array.byte[]getFieldBytes(MonitoringField field) Get the bytes of aMonitoringFieldas a byte array.intgetFieldFlags(ClockField field) Deprecated.use the values inCicsClockfromgetField(ClockField)intgetFieldPeriodCount(ClockField field) Deprecated.use the values inCicsClockfromgetField(ClockField)getFieldTimer(ClockField field) Deprecated.use the values inCicsClockfromgetField(ClockField)doublegetFieldTimerSeconds(DictionaryEntry dictionaryEntry) Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)doublegetFieldTimerSeconds(ClockField field) Deprecated.use the values inCicsClockfromgetField(ClockField)long[]getMultiCountField(DictionaryEntry dictionaryEntry) Get the value of aMultiCountFieldspecified by aDictionaryEntryas an array of longs.getMultiCountFieldAsBigInteger(DictionaryEntry dictionaryEntry) Get the value of aMultiCountFieldspecified by aDictionaryEntryas a List of BigIntegers.longgetPackedField(DictionaryEntry dictionaryEntry) Get the value of aPackedFieldspecified by aDictionaryEntryas a long.getPackedFieldAsBigInteger(DictionaryEntry dictionaryEntry) Get the value of aPackedFieldspecified by aDictionaryEntryas a BigInteger.getTimestampField(DictionaryEntry dictionaryEntry) Get the value of aTimestampFieldspecified by aDictionaryEntryas a ZonedDateTime.getTrannumField(DictionaryEntry dictionaryEntry) Get the value of aTrannumFieldspecified by aDictionaryEntryas an Object.booleanhaveEntry(MonitoringField field) Check whether we have a Dictionary Entry for a field identifierbooleanisValidPacked(DictionaryEntry dictionaryEntry) Check whether thePackedFieldspecified by aDictionaryEntrycontains a valid packed decimal number.booleanisValidPacked(PackedField field) Check whether thePackedFieldcontains a valid packed decimal number.booleanisZero(DictionaryEntry dictionaryEntry) Check whether a field specified by aDictionaryEntryis all zeros ie doesn't contain data or the value is zero.booleanisZero(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- theMonitoringFieldto check- Returns:
- true if all bytes are zero
-
isZero
Check whether a field specified by aDictionaryEntryis all zeros ie doesn't contain data or the value is zero.- Parameters:
dictionaryEntry- theDictionaryEntryto check- Returns:
- true if all bytes are zero
-
getField
Get the value of a field specified by aDictionaryEntryas 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- theDictionaryEntryfor the specific field- Returns:
- Object field value
-
getField
Get the value of any type ofMonitoringFieldas 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- theMonitoringFielddefining 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 aCountFieldas 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 theDictionaryEntryalready, you can usegetCountField(DictionaryEntry).- Parameters:
field- theCountFielddefining the specific field- Returns:
- long field value
-
getCountField
Get the value of a count field specified by aDictionaryEntryas 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- theDictionaryEntrydefining the specific field- Returns:
- long field value
-
getCountField2
Deprecated.Get the value of a 2 byte count fieldDictionaryEntryas a long.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- long field value
-
getCountField4
Deprecated.Get the value of a 4 byte count fieldDictionaryEntryas a long.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- long field value
-
getCountField8
Deprecated.Get the value of a 8 byte count fieldDictionaryEntryas a long.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- long field value
-
getFieldAsBigInteger
Get the value of aCountFieldas 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 theDictionaryEntryyou can usegetCountFieldAsBigInteger(DictionaryEntry)- Parameters:
field- theCountFielddefining the specific field- Returns:
- BigInteger field value
-
getCountFieldAsBigInteger
Get the value of a count field specified by aDictionaryEntryas 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- theDictionaryEntrydefining the specific field
-
getField
Get the value of aMultiCountFieldas 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- theMultiCountFielddefining the specific field- Returns:
- long[] field values
-
getMultiCountField
Get the value of aMultiCountFieldspecified by aDictionaryEntryas 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- theDictionaryEntrydefining the specific field- Returns:
- long[] field values
-
getFieldAsBigInteger
Get the value of aMultiCountFieldas 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- theMultiCountFielddefining the specific field- Returns:
- List<BigInteger> field values
-
getMultiCountFieldAsBigInteger
Get the value of aMultiCountFieldspecified by aDictionaryEntryas a List of BigIntegers. The number of items in the list will be the field length divided by 8.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- List<BigInteger> field values
-
getField
Get the value of aByteStringFieldas a String. If you already have theDictionaryEntry, you can usegetByteStringField(DictionaryEntry)- Parameters:
field- theByteStringFielddefining the specific field- Returns:
- String field value
-
getByteStringField
Get the value of a byte string field specified by aDictionaryEntryas a String.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- String field value
-
isValidPacked
Check whether thePackedFieldcontains a valid packed decimal number. If you already have theDictionaryEntry, you can useisValidPacked(DictionaryEntry)- Parameters:
field- thePackedFielddefining the specific field- Returns:
- String field value
-
isValidPacked
Check whether thePackedFieldspecified by aDictionaryEntrycontains a valid packed decimal number.- Parameters:
dictionaryEntry- thePackedFielddefining the specific field- Returns:
- String field value
-
getField
Get the value of aPackedFieldas a long. If the number of digits exceeds 17, usegetFieldAsBigInteger(PackedField)If you already have theDictionaryEntry, you can usegetPackedField(DictionaryEntry)- Parameters:
field- thePackedFielddefining the specific field- Returns:
- long field value
-
getPackedField
Get the value of aPackedFieldspecified by aDictionaryEntryas a long. If the number of digits exceeds 17, usegetPackedFieldAsBigInteger(DictionaryEntry)- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- long field value
-
getFieldAsBigInteger
Get the value of aPackedFieldas a BigInteger. If you already have theDictionaryEntry, you can usegetPackedFieldAsBigInteger(DictionaryEntry)- Parameters:
field- thePackedFielddefining the specific field- Returns:
- BigInteger field value
-
getPackedFieldAsBigInteger
Get the value of aPackedFieldspecified by aDictionaryEntryas a BigInteger.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- BigInteger field value
-
getField
Get the value of aTrannumFieldas an Object, either Integer or String depending whether the value is a valid packed field. If you already have theDictionaryEntry, you can usegetTrannumField(DictionaryEntry)- Parameters:
field- theTrannumFielddefining the specific field- Returns:
- Object field value
-
getTrannumField
Get the value of aTrannumFieldspecified by aDictionaryEntryas an Object.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- Object field value
-
getFieldAsString
Get the value of aMonitoringFieldas a String.- Parameters:
field- theMonitoringFielddefining the specific field- Returns:
- String field value
-
getFieldAsString
Get the value of a field specified by aDictionaryEntryas a String.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- String field value
-
getFieldBytes
Get the bytes of aMonitoringFieldas a byte array. If you already have theDictionaryEntry, you can usegetFieldBytes(DictionaryEntry)- Parameters:
field- theMonitoringFielddefining the specific field- Returns:
- byte[] the field bytes
-
getFieldBytes
Get the bytes of a field specified by aDictionaryEntryas a byte array.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- byte[] the field bytes
-
getFieldAsHex
Get the bytes of aMonitoringFieldas a hexadecimal String.- Parameters:
field- theMonitoringFielddefining the specific field- Returns:
- String field hexadecimal bytes
-
getFieldAsHex
Get the bytes of a field specified by aDictionaryEntryas a hexadecimal String.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- String field hexadecimal bytes
-
getField
Get the value of aTimestampFieldas a ZonedDateTime. If you already have theDictionaryEntry, you can usegetTimestampField(DictionaryEntry)- Parameters:
field- theTimestampFielddefining the specific field- Returns:
- ZonedDateTime field value
-
getTimestampField
Get the value of aTimestampFieldspecified by aDictionaryEntryas a ZonedDateTime.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- ZonedDateTime field value
-
getField
Get the value of aClockFieldas a CicsClock. If you have theDictionaryEntryalready, you can usegetClockField(DictionaryEntry).- Parameters:
field- theClockFielddefining the specific field- Returns:
- CicsClock field value
-
getClockField
Get the value of a field specified by aDictionaryEntryas a CicsClock.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- CicsClock field value
-
getFieldTimer
Deprecated.use the values inCicsClockfromgetField(ClockField)Get the value of the timer portion of aClockFieldas a Duration. The value is also available as a double in seconds, which may be more useful for calculations. SeegetFieldTimerSeconds(ClockField).- Parameters:
field- theClockFielddefining the specific field- Returns:
- Duration field value as a Duration
-
getClockFieldTimer
Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)Get the value of the timer portion of a clock field specified by aDictionaryEntryas a Duration. The value is also available as a double in seconds, which may be more useful for calculations. SeegetFieldTimerSeconds(DictionaryEntry).- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- Duration field value as a Duration
-
getFieldTimerSeconds
Deprecated.use the values inCicsClockfromgetField(ClockField)Get the value of the timer portion of aClockFieldin seconds.- Parameters:
field- theClockFielddefining the specific field- Returns:
- double field value in seconds
-
getFieldTimerSeconds
Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)Get the value of the timer portion of a clock field specified by aDictionaryEntryin seconds.- Parameters:
dictionaryEntry- theDictionaryEntrydefining the specific field- Returns:
- double field value in seconds
-
getFieldFlags
Deprecated.use the values inCicsClockfromgetField(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- theClockFielddefining the specific field- Returns:
- int field value
-
getClockFieldFlags
Deprecated.use the values inCicsClockfromgetClockField(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- theDictionaryEntrydefining the specific field- Returns:
- int field value
-
getFieldPeriodCount
Deprecated.use the values inCicsClockfromgetField(ClockField)Get the period count of a CICSClockField.- Parameters:
field- theClockFielddefining the specific field- Returns:
- int field value
-
getClockFieldPeriodCount
Deprecated.use the values inCicsClockfromgetClockField(DictionaryEntry)Get the period count of a CICS clock field specified by aDictionaryEntry.- Parameters:
dictionaryEntry- theDictionaryEntrydefining 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
-
CicsClockfromgetClockField(DictionaryEntry)