Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • additional to ISE
    • about section 11.1.4: Yes it looks like they added a enable/disable switch if a sensor is active (collects data) and also if it sends the data. Even if that is not much code, it will have an influence on the 17 microseconds per method call
    • hashcode function: I think this has something to do with the resolution of java.util.Date.getTime() => Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT. DefaultData.java uses the hashCode function of java.util.TimeStamp which uses the hashcode function of its superclass. This superclass is java.util.Date which calls its method getTime().
  • wrote E-Mail to Jan Waller asking him to provide the modified agent and cmr
  • What I might could do is using benchIT to re-test. We would not be able to use exactly the same method (due to the recursion) but it should be possible measuring the execution time of one method (maybe with calls to other methods (no benchIT test methods) without inspectIT, with inspectIT running (Agent + CMR, only Agent)

Explanations

Hash problem

As stated by Jan the hash problem is related to the InvocationSequenceHook class, line 242:

Code Block
languagejava
titleInvocationSequenceHook.java
firstline242
linenumberstrue
	coreService.addMethodSensorData(sensorTypeId, methodId, String.valueOf(System.currentTimeMillis()), invocationSequenceData);

Because the data passed to the CoreService will be used to construct the String that will be used as the key for the map, put to the map will effectively remove the data from the map that has the sameĀ System.currentTimeMillis() long value.

Code Block
titleCoreService.java
firstline232
linenumberstrue
	public void addMethodSensorData(long sensorTypeIdent, long methodIdent, String prefix, MethodSensorData methodSensorData) {
		StringBuffer buffer = new StringBuffer();
		if (null != prefix) {
			buffer.append(prefix);
			buffer.append('.');
		}
		buffer.append(methodIdent);
		buffer.append('.');
		buffer.append(sensorTypeIdent);
		sensorDataObjects.put(buffer.toString(), methodSensorData);
		notifyListListeners();
	}

His fix was to use the System.nanoTime() in the InvocationSequenceHook instead of going for millis.