code: public void doBenchmarkFile(String filename)
    {
      try
      {
  
        try (BufferedReader reader = new BufferedReader(new InputStreamReader(
          new FileInputStream(filename), "UTF-8"));)
        {
          Map<String, Integer> queryRun = new HashMap<>();
          Map<String, Integer> queryId = new HashMap<>();
          int maxId = 0;
          for (String line = reader.readLine(); line != null; line = reader.
            readLine())
          {
            // get the id of this query
            if (!queryId.containsKey(line))
            {
              ++maxId;
              queryId.put(line, maxId);
            }
            int id = queryId.get(line);
            // get the repetition of this query
            if (!queryRun.containsKey(line))
            {
              queryRun.put(line, 0);
            }
            int run = queryRun.get(line) + 1;
            queryRun.put(line, run);
            String[] split = line.split(" ", 2);
            String queryFunction = split[0];
            String annisQuery = split[1];
            boolean error = false;
            QueryData queryData = null;
            try
            {
              queryData = analyzeQuery(annisQuery, queryFunction);
            }
            catch (RuntimeException e)
            {
              error = true;
            }
            if ("count".equals(queryFunction))
            {
              long start = new Date().getTime();
              if (!error)
              {
                try
                {
                  int result = queryDao.count(queryData);
                  long end = new Date().getTime();
                  long runtime = end - start;
                  Object[] output =
                  {
                    queryFunction, annisQuery, result, runtime, id, run
                  };
                  System.out.println(StringUtils.join(output, "\t"));
                }
                catch (RuntimeException e)
                {
                  error = true;
                }
              }
              if (error)
              {
                String result = "ERROR";
                long end = new Date().getTime();
                long runtime = end - start;
                Object[] output =
                {
                  queryFunction, annisQuery, result, runtime, id, run
                };
                System.out.println(StringUtils.join(output, "\t"));
              }
            }
          }
        }
      }
      catch (IOException e)
      {
        error(e);
      }
    }
docs: /// Commands