APISonar


com.dremio.common.perf.Timer.time

> com > dremio > common > perf > Timer > time
com APIs dremio APIs common APIs perf APIs Timer APIs time APIs

Example 1
public RestServerV2(ScanResult result) {
    try (TimedBlock b = Timer.time("new RestServer")) {
      init(result);
    }
  }
Example 2
public ZkServer(String dirPath, int port, final boolean autoPort) {
    try (TimedBlock b = Timer.time("new ZkServer")) {
      if (dirPath != null) {
        // TODO - add basic sanity check that the input value looks like a filesytem path
        storageDir = new File(dirPath);
      } else {
        storageDir = Files.createTempDir();
        logger.info("Created temporary storage dir: {}", storageDir.toString());
      }
      this.autoPort = autoPort;
      this.port = port;
      // start embedded zookeeper in here in order to initialize port.
    }
  }
Example 3
public static void main(final String[] args) throws Exception {
    try (TimedBlock b = Timer.time("main")) {
      DACConfig config = DACConfig.newConfig();
      DACDaemon daemon = newDremioDaemon(config, ClassPathScanner.fromPrescan(config.getConfig().getSabotConfig()));
      daemon.init();
      daemon.closeOnJVMShutDown();
    }
  }
Example 4
public static DACDaemon newDremioDaemon(
      DACConfig dacConfig,
      ScanResult scanResult,
      DACModule dacModule) throws IOException {
    try (TimedBlock b = Timer.time("newDaemon")) {
      return new DACDaemon(dacConfig.getConfig(), scanResult, dacModule);
    }
  }
Example 5
public int getDescendantsCount(NamespaceKey path) {
    try (TimedBlock b = Timer.time("getDescendantCounts")) {
      return namespaceService.getCounts(SearchQueryUtils.newTermQuery(DATASET_ALLPARENTS, path.toString())).get(0);
    } catch(NamespaceException e) {
      logger.error("Failed to get descendant counts for path " + path);
      return 0;
    }
  }