Skip to content

Commit a9177bc

Browse files
committed
fix: Make module paths w.r.t / and not drishti/
1 parent ee02934 commit a9177bc

File tree

4 files changed

+54
-51
lines changed

4 files changed

+54
-51
lines changed

drishti/handlers/handle_darshan.py

Lines changed: 47 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,18 @@
1616

1717
import darshan
1818
import darshan.backend.cffi_backend as darshanll
19-
import includes.config as config
20-
import includes.module as module
2119
import pandas as pd
22-
from includes.module import HIGH, RECOMMENDATIONS, WARN, Panel, insights_total
23-
24-
# from includes.module import *
25-
from includes.parser import args
2620
from packaging import version
2721
from rich import print
2822
from rich.padding import Padding
2923

24+
import drishti.includes.config as config
25+
import drishti.includes.module as module
26+
from drishti.includes.module import HIGH, RECOMMENDATIONS, WARN, Panel, insights_total
27+
28+
# from includes.module import *
29+
from drishti.includes.parser import args
30+
3031

3132
def is_available(name):
3233
"""Check whether `name` is on PATH and marked as executable."""
@@ -346,61 +347,62 @@ def _do_something(self):
346347
# TODO: for trace in traces
347348
for trace in self.traces:
348349
pass
349-
module.check_misaligned(self.total_operations, self.total_mem_not_aligned, self.total_file_not_aligned,
350-
self.modules, self.name_records, self.lustre_df, self.dxt_posix,
351-
self.dxt_posix_read_data) # posix alignment
350+
# module.check_misaligned(self.total_operations, self.total_mem_not_aligned, self.total_file_not_aligned,
351+
# self.modules, self.name_records, self.lustre_df, self.dxt_posix,
352+
# self.dxt_posix_read_data) # posix alignment
352353

353-
module.check_traffic(self.max_read_offset, self.total_read_size, self.max_write_offset, self.total_written_size,
354-
self.dxt_posix, self.dxt_posix_read_data, self.dxt_posix_write_data) # redundant reads
354+
# module.check_traffic(self.max_read_offset, self.total_read_size, self.max_write_offset, self.total_written_size,
355+
# self.dxt_posix, self.dxt_posix_read_data, self.dxt_posix_write_data) # redundant reads
355356

356-
module.check_random_operation(self.read_consecutive, self.read_sequential, self.read_random, self.total_reads,
357-
self.write_consecutive, self.write_sequential, self.write_random,
358-
self.total_writes, self.dxt_posix,
359-
self.dxt_posix_read_data, self.dxt_posix_write_data) # random check
357+
# module.check_random_operation(self.read_consecutive, self.read_sequential, self.read_random, self.total_reads,
358+
# self.write_consecutive, self.write_sequential, self.write_random,
359+
# self.total_writes, self.dxt_posix,
360+
# self.dxt_posix_read_data, self.dxt_posix_write_data) # random check
360361

361-
module.check_shared_small_operation(self.total_shared_reads, self.total_shared_reads_small,
362-
self.total_shared_writes,
363-
self.total_shared_writes_small, self.shared_files, self.report.name_records)
362+
# module.check_shared_small_operation(self.total_shared_reads, self.total_shared_reads_small,
363+
# self.total_shared_writes,
364+
# self.total_shared_writes_small, self.shared_files, self.report.name_records)
364365

365366
module.check_long_metadata(self.count_long_metadata, self.modules)
366367

367-
module.check_shared_data_imblance(self.posix_shared_data_imbalance_stragglers_count,
368-
self.posix_data_straggler_files,
369-
self.report.name_records, self.dxt_posix,
370-
self.dxt_posix_read_data,
371-
self.dxt_posix_write_data)
372-
373-
module.check_shared_time_imbalance(self.posix_stragglers_shared_file_time_imbalance_count,
374-
self.posix_shared_time_imbalance_detected_files1, self.report.name_records)
375-
376-
module.check_individual_write_imbalance(self.posix_data_imbalance_count,
377-
self.posix_shared_time_imbalance_detected_files2,
378-
self.report.name_records, self.dxt_posix, self.dxt_posix_write_data)
368+
# module.check_shared_data_imblance(self.posix_shared_data_imbalance_stragglers_count,
369+
# self.posix_data_straggler_files,
370+
# self.report.name_records, self.dxt_posix,
371+
# self.dxt_posix_read_data,
372+
# self.dxt_posix_write_data)
379373

380-
module.check_mpi_collective_read_operation(self.mpiio_coll_reads, self.mpiio_indep_reads,
381-
self.total_mpiio_read_operations,
382-
self.detected_files_mpi_coll_reads, self.report.name_records,
383-
self.dxt_mpiio)
374+
# module.check_shared_time_imbalance(self.posix_stragglers_shared_file_time_imbalance_count,
375+
# self.posix_shared_time_imbalance_detected_files1, self.report.name_records)
384376

385-
module.check_mpi_collective_write_operation(self.mpiio_coll_writes, self.mpiio_indep_writes,
386-
self.total_mpiio_write_operations,
387-
self.detected_files_mpiio_coll_writes, self.report.name_records, self.dxt_mpiio)
377+
# module.check_individual_write_imbalance(self.posix_data_imbalance_count,
378+
# self.posix_shared_time_imbalance_detected_files2,
379+
# self.report.name_records, self.dxt_posix, self.dxt_posix_write_data)
388380

389-
module.check_individual_read_imbalance(self.imbalance_count_posix_shared_time,
390-
self.posix_shared_time_imbalance_detected_files3,
391-
self.report.name_records, self.dxt_posix, self.dxt_posix_read_data)
381+
# module.check_mpi_collective_read_operation(self.mpiio_coll_reads, self.mpiio_indep_reads,
382+
# self.total_mpiio_read_operations,
383+
# self.detected_files_mpi_coll_reads, self.report.name_records,
384+
# self.dxt_mpiio)
385+
386+
# module.check_mpi_collective_write_operation(self.mpiio_coll_writes, self.mpiio_indep_writes,
387+
# self.total_mpiio_write_operations,
388+
# self.detected_files_mpiio_coll_writes, self.report.name_records, self.dxt_mpiio)
389+
#
390+
# module.check_individual_read_imbalance(self.imbalance_count_posix_shared_time,
391+
# self.posix_shared_time_imbalance_detected_files3,
392+
# self.report.name_records, self.dxt_posix, self.dxt_posix_read_data)
392393

393394
module.check_mpi_none_block_operation(self.mpiio_nb_reads, self.mpiio_nb_writes, self.has_hdf5_extension,
394395
self.modules)
395396

396397

397398

398399
def _small_operation_insight(self):
399-
module.check_small_operation(self.total_reads, self.total_reads_small, self.total_writes,
400-
self.total_writes_small,
401-
self.small_operation_detected_files,
402-
self.modules, self.report.name_records, self.dxt_posix, self.dxt_posix_read_data,
403-
self.dxt_posix_write_data)
400+
pass
401+
# module.check_small_operation(self.total_reads, self.total_reads_small, self.total_writes,
402+
# self.total_writes_small,
403+
# self.small_operation_detected_files,
404+
# self.modules, self.report.name_records, self.dxt_posix, self.dxt_posix_read_data,
405+
# self.dxt_posix_write_data)
404406

405407

406408

drishti/includes/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import json
44
import os
55

6-
from includes.parser import *
6+
from drishti.includes.parser import *
77
from rich.console import Console, Group
88
from rich.padding import Padding
99
from rich.panel import Panel

drishti/includes/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import time
66

77
import pandas as pd
8-
from includes.config import *
8+
from drishti.includes.config import *
99
from rich import box
1010
from rich.syntax import Syntax
1111

drishti/reporter.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import os
44
import sys
55
from subprocess import call
6+
from typing import List, Optional
67

78
# from includes.parser import * # imports {'parser', 'args', 'argparse'} # TODO: Is next line enuf
8-
from includes.parser import args
9+
from drishti.includes.parser import args
910

1011
'''
1112
|- handler_darshan -|
@@ -29,7 +30,7 @@ def clear():
2930
_ = call('clear' if os.name == 'posix' else 'cls')
3031

3132

32-
def check_log_type(paths: list[str]) -> int | None:
33+
def check_log_type(paths: List[str]) -> Optional[int]:
3334
is_darshan = True
3435
is_recorder = True
3536
multiple_logs = len(paths) > 1
@@ -70,10 +71,10 @@ def main():
7071
log_type = check_log_type(args.log_paths)
7172

7273
if log_type == LOG_TYPE_DARSHAN:
73-
from handlers.handle_darshan import handler
74+
from drishti.handlers.handle_darshan import handler
7475

7576
elif log_type == LOG_TYPE_RECORDER:
76-
from handlers.handle_recorder import handler
77+
from drishti.handlers.handle_recorder import handler
7778

7879
handler()
7980

0 commit comments

Comments
 (0)