public boolean throttle(NodeList allNodes, Agent agent) {
        Instant startOfWindow = nodeRepository.clock().instant().minus(WINDOW);
        int provisionedRecently = allNodes.matching(host -> host.history().hasEventAfter(History.Event.Type.provisioned,
                                                                                         startOfWindow))
                                          .size();
        boolean throttle = throttle(provisionedRecently, maxHostsPerHourFlag.value(), agent);
        metric.set(throttlingActiveMetric, throttle ? 1 : 0, null);
        return throttle;
    }
@Test
    void throttling() {
        Agent agent = Agent.system;
        assertFalse(throttle(239, 10, agent));
        assertFalse(throttle(240, 10, agent));
        assertTrue(throttle(241, 10, agent));
    }