private void add(String hostname, NodeMetricSnapshot snapshot) {
        NodeTimeseries timeseries = nodeTimeseries.get(hostname);
        if (timeseries == null) { // new node
            timeseries = new NodeTimeseries(hostname, new ArrayList<>());
            nodeTimeseries.put(hostname, timeseries);
        }
        nodeTimeseries.put(hostname, timeseries.add(snapshot));
    }
Lock all access for now since we modify lists inside a map
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/autoscale/MemoryMetricsDb.java