docs: public static Map<String, Object> getRunningAndCompleteStats() {
      Map<String, Object> root = new TreeMap<String, Object>();
      
      if (running_queries.isEmpty()) {
        root.put("running", Collections.emptyList());
      } else {
        final List<Object> running = new ArrayList<Object>(running_queries.size());
        root.put("running", running);
        
        // don't need to lock the map beyond what the iterator will do implicitly
        for (final QueryStats stats : running_queries.values()) {
          final Map<String, Object> obj = new HashMap<String, Object>(10);
          obj.put("query", stats.query);
          obj.put("remote", stats.remote_address);
          obj.put("user", stats.user);
          obj.put("headers", stats.headers);;
          obj.put("queryStart", stats.query_start_ms);
          obj.put("elapsed", DateTime.msFromNanoDiff(DateTime.nanoTime(), 
              stats.query_start_ns));
          running.add(obj);
        }
      }
      
      final Map<Integer, QueryStats> completed = completed_queries.asMap();
      if (completed.isEmpty()) {
        root.put("completed", Collections.emptyList());
      } else {
        root.put("completed", completed.values());
      }
      
      return root;
    }