esmf-org / esmf-profiler

ESMF Profiler application converts binary traces into a web based, dynamic report.
0 stars 2 forks source link

First pass at command line arguments #13

Closed rsdunlapiv closed 3 years ago

rsdunlapiv commented 3 years ago

Here is a reasonable first target:

Process a trace and write out static web site to local file system

$ ./esmf-profiler /path/to/traceout --name mytrace --outdir /path/to/output/root

The name should be used in the title of the static site and at the top of the UI.

Process a trace and push to repo on GitHub:

$ ./esmf-profiler /path/to/traceout --name another_trace --push git@github.com:esmf-org/app-profiles.git

In this case we assume the user already has access to the repo at git@github.com:esmf-org/app-profiles.git and has write permissions. If not a friendly error message can be provided. The repo would be cloned in a temporary location, the static site added, and them commit/push.

In both cases (local file system and push to remote repo) we need a structured approach to the output directory structure. Here is a good first target.

Assume the user provides --name bananas01 --outdir /path/to/root. Use a combination of the user name (use whoami) and the trace name so that the static site would be put here:

/path/to/root/<username>/bananas01/

In the case of the remote repo, the same approach can be used. Assume the user provides --name bananas01 --push git@github.com:esmf-org/app-profiles.git Also assume the temporary file space is ./.tmp:

./.tmp/app-profiles/<username>/bananas01/

Re-running the profiler again with the same name would overwrite the existing directory if it is present.

ryanlong1004 commented 3 years ago

@rsdunlapiv closing this out as completed an in development branch