/** * Constructor. * * @param jmxDefinitionDataIdentId * the id of the related {@link JmxDefinitionDataIdent} of this * {@link JmxSensorValueData} * @param value * the value * @param timestamp * the timestamp when this value was captured * @param platformIdent * the id of the related {@link PlatformIdent} * @param sensorTypeIdent * the id of the related {@link SensorTypeIdent} */ public JmxSensorValueData(long jmxDefinitionDataIdentId, String value, Timestamp timestamp, long platformIdent, long sensorTypeIdent) { setJmxSensorDefinitionDataIdentId(jmxDefinitionDataIdentId); setValue(value); super.setTimeStamp(timestamp); super.setPlatformIdent(platformIdent); super.setSensorTypeIdent(sensorTypeIdent); super.setId(jmxDefinitionDataIdentId); }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } RuntimeInformationData other = (RuntimeInformationData) obj; if (uptime != other.uptime) { return false; } return true; }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + (int) (uptime ^ (uptime >>> 32)); return result; }
/** * Initializes the {@link SystemSensorData}. */ private void initSensorData() { SystemSensorData systemSensorData = this.getSystemSensorData(); systemSensorData.setPlatformIdent(this.platformManager.getPlatformId()); systemSensorData.setSensorTypeIdent(sensorTypeConfig.getId()); }
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 1, 3, 1, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
@Test void initExistingPlatformSensorData() throws Exception { PlatformSensorTypeConfig platformSensorTypeConfigA = Mockito.mock(PlatformSensorTypeConfig.class); when(platformSensorTypeConfigA.getClassName()).thenReturn("rocks.inspectit.agent.java.sensor.platform.AbstractPlatformSensorFakeImpl"); when(this.configurationStorage.getPlatformSensorTypes()).thenReturn(Arrays.asList(platformSensorTypeConfigA)); when(this.platformManager.getPlatformId()).thenReturn(1337L); when(platformSensorTypeConfigA.getId()).thenReturn(73L); this.cut.afterPropertiesSet(); SystemSensorData systemSensorData = this.cut.getSystemSensorData(); verify(systemSensorData).setPlatformIdent(1337L); verify(systemSensorData).setSensorTypeIdent(73L); }
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 1, 0, 21, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + count; result = (prime * result) + (int) (maxTotalCompilationTime ^ (maxTotalCompilationTime >>> 32)); result = (prime * result) + (int) (minTotalCompilationTime ^ (minTotalCompilationTime >>> 32)); result = (prime * result) + (int) (totalTotalCompilationTime ^ (totalTotalCompilationTime >>> 32)); return result; }
/** * {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!super.equals(obj)) { return false; } if (getClass() != obj.getClass()) { return false; } CompilationInformationData other = (CompilationInformationData) obj; if (count != other.count) { return false; } if (maxTotalCompilationTime != other.maxTotalCompilationTime) { return false; } if (minTotalCompilationTime != other.minTotalCompilationTime) { return false; } if (totalTotalCompilationTime != other.totalTotalCompilationTime) { return false; } return true; }
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 0, 0, 1, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + count; result = (prime * result) + maxLoadedClassCount; result = (prime * result) + (int) (maxTotalLoadedClassCount ^ (maxTotalLoadedClassCount >>> 32)); result = (prime * result) + (int) (maxUnloadedClassCount ^ (maxUnloadedClassCount >>> 32)); result = (prime * result) + minLoadedClassCount; result = (prime * result) + (int) (minTotalLoadedClassCount ^ (minTotalLoadedClassCount >>> 32)); result = (prime * result) + (int) (minUnloadedClassCount ^ (minUnloadedClassCount >>> 32)); result = (prime * result) + totalLoadedClassCount; result = (prime * result) + (int) (totalTotalLoadedClassCount ^ (totalTotalLoadedClassCount >>> 32)); result = (prime * result) + (int) (totalUnloadedClassCount ^ (totalUnloadedClassCount >>> 32)); return result; }
return true; if (!super.equals(obj)) { return false;
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 10, 0, 3, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + count; result = (prime * result) + maxDaemonThreadCount; result = (prime * result) + maxPeakThreadCount; result = (prime * result) + maxThreadCount; result = (prime * result) + (int) (maxTotalStartedThreadCount ^ (maxTotalStartedThreadCount >>> 32)); result = (prime * result) + minDaemonThreadCount; result = (prime * result) + minPeakThreadCount; result = (prime * result) + minThreadCount; result = (prime * result) + (int) (minTotalStartedThreadCount ^ (minTotalStartedThreadCount >>> 32)); result = (prime * result) + totalDaemonThreadCount; result = (prime * result) + totalPeakThreadCount; result = (prime * result) + totalThreadCount; result = (prime * result) + (int) (totalTotalStartedThreadCount ^ (totalTotalStartedThreadCount >>> 32)); return result; }
return true; if (!super.equals(obj)) { return false;
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 1, 0, 3, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + count; result = (prime * result) + (int) (maxComittedHeapMemorySize ^ (maxComittedHeapMemorySize >>> 32));
return true; if (!super.equals(obj)) { return false;
/** * {@inheritDoc} */ @Override public long getObjectSize(IObjectSizes objectSizes, boolean doAlign) { long size = super.getObjectSize(objectSizes, doAlign); size += objectSizes.getPrimitiveTypesSize(0, 0, 4, 0, 6, 0); if (doAlign) { return objectSizes.alignTo8Bytes(size); } else { return size; } }
/** * {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = (prime * result) + count; result = (prime * result) + Float.floatToIntBits(maxCpuUsage); result = (prime * result) + Float.floatToIntBits(minCpuUsage); result = (prime * result) + (int) (processCpuTime ^ (processCpuTime >>> 32)); result = (prime * result) + Float.floatToIntBits(totalCpuUsage); return result; }