src/java.base/share/classes/java/util/zip/ZipFile.java
Print this page
*** 52,61 ****
--- 52,62 ----
import java.util.WeakHashMap;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import jdk.internal.misc.JavaUtilZipFileAccess;
import jdk.internal.misc.SharedSecrets;
+ import jdk.internal.perf.PerfCounter;
import static java.util.zip.ZipConstants.*;
import static java.util.zip.ZipConstants64.*;
import static java.util.zip.ZipUtils.*;
*** 208,219 ****
Objects.requireNonNull(charset, "charset");
this.zc = ZipCoder.get(charset);
this.name = name;
long t0 = System.nanoTime();
this.zsrc = Source.get(file, (mode & OPEN_DELETE) != 0);
! sun.misc.PerfCounter.getZipFileOpenTime().addElapsedTimeFrom(t0);
! sun.misc.PerfCounter.getZipFileCount().increment();
}
/**
* Opens a zip file for reading.
*
--- 209,220 ----
Objects.requireNonNull(charset, "charset");
this.zc = ZipCoder.get(charset);
this.name = name;
long t0 = System.nanoTime();
this.zsrc = Source.get(file, (mode & OPEN_DELETE) != 0);
! PerfCounter.getZipFileOpenTime().addElapsedTimeFrom(t0);
! PerfCounter.getZipFileCount().increment();
}
/**
* Opens a zip file for reading.
*