1616import java .nio .file .Path ;
1717import java .nio .file .Paths ;
1818import java .nio .file .StandardOpenOption ;
19+ import java .time .Duration ;
20+ import java .time .Instant ;
1921import java .util .Arrays ;
2022import java .util .OptionalDouble ;
2123
@@ -48,10 +50,10 @@ private void run() {
4850 // ATL03_20250302235544_11742607_006_01
4951// Path dirPath = Paths.get(Objects.requireNonNull(HDF5Debug.class.getClassLoader().getResource("HDF5Examples/h5ex_g_compact2.h5")).toURI());
5052// Path dirPath = Paths.get("c:/users/karln/Downloads/ATL03_20250302235544_11742607_007_01.h5");
51- // Path dirPath = Paths.get("c:/users/karln /Downloads/ATL03_20250302235544_11742607_006_01.h5");
53+ Path dirPath = Paths .get ("c:/users/karnicho /Downloads/ATL03_20250302235544_11742607_006_01.h5" );
5254// Path dirPath = Paths.get("c:/users/karln/Downloads/SMAP_L1B_TB_57204_D_20251016T224815_R19240_001.h5");
5355// Path dirPath = Paths.get("c:/users/karln/Downloads/ATL08_20250610011615_13002704_007_01.h5");
54- Path dirPath = Paths .get ("c:/users/karln/Downloads/SMAP_L2_SM_P_55348_A_20250612T001323_R19240_001.h5" );
56+ // Path dirPath = Paths.get("c:/users/karln/Downloads/SMAP_L2_SM_P_55348_A_20250612T001323_R19240_001.h5");
5557
5658
5759 processFile (dirPath );
@@ -62,6 +64,7 @@ private void run() {
6264 // Generalized method to process the file and apply a custom action per dataset
6365 private static void processFile (Path filePath ) {
6466 try (SeekableByteChannel channel = Files .newByteChannel (filePath , StandardOpenOption .READ )) {
67+ Instant start = Instant .now ();
6568 HdfFileReader reader = new HdfFileReader (channel ).readFile ();
6669
6770 for (HdfDataset dataSet : reader .getDatasets ()) {
@@ -78,6 +81,7 @@ private static void processFile(Path filePath) {
7881// HdfDisplayUtils.displayData(channel, dataSet, reader, HdfDisplayUtils.DisplayMode.SUMMARY_STATS);
7982//// displayScalarData(channel, dataSet, HdfFloatPoint.class, reader);
8083
84+ System .out .println ("Total duration: " + Duration .between (start , Instant .now ()));
8185 } catch (Exception e ) {
8286 log .error ("Exception in processFile: {}" , filePath , e );
8387 }
0 commit comments