equal
deleted
inserted
replaced
38 public class PerfCounters { |
38 public class PerfCounters { |
39 private final static MonitoredVm vm; |
39 private final static MonitoredVm vm; |
40 |
40 |
41 static { |
41 static { |
42 try { |
42 try { |
43 String pid = Integer.toString(ProcessTools.getProcessId()); |
43 String pid = Long.toString(ProcessTools.getProcessId()); |
44 VmIdentifier vmId = new VmIdentifier(pid); |
44 VmIdentifier vmId = new VmIdentifier(pid); |
45 MonitoredHost host = MonitoredHost.getMonitoredHost(vmId); |
45 MonitoredHost host = MonitoredHost.getMonitoredHost(vmId); |
46 vm = host.getMonitoredVm(vmId); |
46 vm = host.getMonitoredVm(vmId); |
47 } catch (Exception e) { |
47 } catch (Exception e) { |
48 throw new RuntimeException("Could not connect to the VM"); |
48 throw new RuntimeException("Could not connect to the VM"); |