From 4e984e18311fc3811136661800b65783d15e1212 Mon Sep 17 00:00:00 2001 From: carns Date: Thu, 25 Jul 2013 17:15:35 +0000 Subject: [PATCH] print timestamps in detailed file list view git-svn-id: https://svn.mcs.anl.gov/repos/darshan/branches/darshan-parser-file-list@748 3b7491f3-a168-0410-bf4b-c445ed680a29 --- darshan-util/darshan-parser.c | 45 +++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/darshan-util/darshan-parser.c b/darshan-util/darshan-parser.c index c304201..7169a77 100644 --- a/darshan-util/darshan-parser.c +++ b/darshan-util/darshan-parser.c @@ -705,6 +705,24 @@ void accum_file(struct darshan_job *job, { switch(i) { + case CP_F_OPEN_TIMESTAMP: + case CP_F_READ_START_TIMESTAMP: + case CP_F_WRITE_START_TIMESTAMP: + if(hfile->fcounters[i] == 0 || + hfile->fcounters[i] > dfile->fcounters[i]) + { + hfile->fcounters[i] = dfile->fcounters[i]; + } + break; + case CP_F_CLOSE_TIMESTAMP: + case CP_F_READ_END_TIMESTAMP: + case CP_F_WRITE_END_TIMESTAMP: + if(hfile->fcounters[i] == 0 || + hfile->fcounters[i] < dfile->fcounters[i]) + { + hfile->fcounters[i] = dfile->fcounters[i]; + } + break; case CP_F_FASTEST_RANK_TIME: case CP_F_SLOWEST_RANK_TIME: case CP_F_VARIANCE_RANK_TIME: @@ -741,6 +759,7 @@ void file_list(struct darshan_job *djob, hash_entry_t *file_hash, int detail_fla hash_entry_t *curr = NULL; hash_entry_t *tmp = NULL; char* type; + int i; /* TODO: list of columns: * @@ -777,8 +796,22 @@ void file_list(struct darshan_job *djob, hash_entry_t *file_hash, int detail_fla printf("# : number of processes that opened the file\n"); printf("# : (estimated) time in seconds consumed in IO by slowest process.\n"); printf("# : average time in seconds consumed in IO per process.\n"); + if(detail_flag) + { + printf("# : start timestamp of first open, read, or write\n"); + printf("# : end timestamp of last open, read, or write\n"); + } - printf("\n# \t\t\t\t\t\n"); + printf("\n# \t\t\t\t\t"); + if(detail_flag) + { + printf("\t\t\t"); + printf("\t\t\t\n"); + } + else + { + printf("\n"); + } HASH_ITER(hlink, file_hash, curr, tmp) { if(curr->counters[CP_INDEP_OPENS] || curr->counters[CP_COLL_OPENS]) @@ -786,13 +819,21 @@ void file_list(struct darshan_job *djob, hash_entry_t *file_hash, int detail_fla else type = "POSIX"; - printf("%" PRIu64 "\t%s\t%s\t%" PRId64 "\t%f\t%f\n", + printf("%" PRIu64 "\t%s\t%s\t%" PRId64 "\t%f\t%f", curr->hash, curr->name_suffix, type, curr->procs, curr->slowest_time, curr->cumul_time/(double)curr->procs); + if(detail_flag) + { + for(i=CP_F_OPEN_TIMESTAMP; i<=CP_F_WRITE_END_TIMESTAMP; i++) + { + printf("\t%f", curr->fcounters[i]); + } + } + printf("\n"); } return; -- 2.26.2