public SystemPoller(List<VespaService> services, Duration interval) {
        this.services = services;
        this.interval = interval;
        systemPollTimer = new Timer("systemPollTimer", true);
        jiffiesInterface = new GetJiffies() {
            @Override
            public JiffiesAndCpus getTotalSystemJiffies() {
                return SystemPoller.getTotalSystemJiffies();
            }

            @Override
            public long getJiffies(VespaService service) {
                return SystemPoller.getPidJiffies(service);
            }
        };
        lastTotalCpuJiffies = jiffiesInterface.getTotalSystemJiffies();
        for (VespaService s : services) {
            lastCpuJiffiesMetrics.put(s, jiffiesInterface.getJiffies(s));
        }
    }
@Test
    public void testSystemPoller() {
        DummyService s = new DummyService(0, "id");
        List<VespaService> services = new ArrayList<>();
        services.add(s);

        assertFalse(s.isAlive());

        long n = SystemPoller.getPidJiffies(s);
        assertEquals(0L, n);
        long[] memusage = SystemPoller.getMemoryUsage(s);
        assertEquals(0L, memusage[0]);
        assertEquals(0L, memusage[1]);
    }