public void close()

in sdk/host/src/main/java/org/apache/teaclave/javasdk/host/MetricTrace.java [90:105]


    public void close() throws MetricTraceLogWriteException {
        try {
            if (isEnableEnclaveMetricTrace()) {
                if (logFile == null) {
                    synchronized (MetricTrace.class) {
                        if (logFile == null) {
                            logFile = new BufferedWriter(new FileWriter(logPath));
                        }
                    }
                }
                metricTracing(getEnclaveInfo(), getMetricKeyName(), System.nanoTime() - start, getCostInnerEnclave());
            }
        } catch (IOException e) {
            throw new MetricTraceLogWriteException(e);
        }
    }