Open
Description
- use EnumMap instead of HashMap for sysInfoStringMap.
- split com.griddynamics.jagger.agent.model.SystemInfoCollector#getMemInfo into corresponding methods. Currently the workflow is as follows: org.hyperic.sigar.Mem gathers statistics; statistics are converted to Strings and put to a map; MonitoringInfoServiceImpl reads the map and parses the Strings into doubles, and puts into sysInfoStringMap. The intermediate conversion steps seem to be redundant.
- you don't need to create a Thread each tome here:
final SettableFuture<Map<String, SystemUnderTestInfo>> future = SettableFuture.create();
jmxThreadPoolExecutor.submit(new Thread() {
@OverRide
public void run() {
future.set(systemUnderTestService.getInfo());
}
});
You need Callable instead. - why would you want to TimeUtils.sleepMillis(JMX_TIMEOUT) after timeout?
- SystemUnderTestService statistics are collected effectively synchronously. Consider submitting the task in the beginning of the method
- update guava dependency
- on ExecutionException you'd rather propagate it's cause. Otherwise, there's little benefit in calling Throwables.propagate(e) as e is always checked
Metadata
Metadata
Assignees
Labels
No labels