Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add start and end time to info.json #201

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

asmacdo
Copy link
Member

@asmacdo asmacdo commented Oct 9, 2024

Fixes #193

This does not need a schema bump, so long as this is merged for the same release as #200

Its not pretty:

    "start_time": 1728506948.210715,
    "end_time": 1728506949.2119823
Full info.json
{
  "command": "sleep 1",
  "system": {
    "cpu_total": 20,
    "memory_total": 33336131584,
    "hostname": "fancy",
    "uid": 1000,
    "user": "austin"
  },
  "env": {},
  "gpu": null,
  "duct_version": "0.5.0",
  "schema_version": "0.1.1",
  "execution_summary": {
    "exit_code": 0,
    "command": "sleep 1",
    "logs_prefix": "Z_",
    "wall_clock_time": 1.0012671947479248,
    "peak_rss": 1896448,
    "average_rss": 1896448.0,
    "peak_vsz": 232374272,
    "average_vsz": 232374272.0,
    "peak_pmem": 0.0,
    "average_pmem": 0.0,
    "peak_pcpu": 0.0,
    "average_pcpu": 0.0,
    "num_samples": 9,
    "num_reports": 2,
    "start_time": 1728506948.210715,
    "end_time": 1728506949.2119823
  },
  "output_paths": {
    "stdout": "Z_stdout",
    "stderr": "Z_stderr",
    "usage": "Z_usage.json",
    "info": "Z_info.json",
    "prefix": "Z_"
  }
}

But sticking with the theme of keeping info.json machine readable, I've opted not to do something like

end_time = datetime.utcfromtimestamp(data['end_time']).strftime('%Y-%m-%d %H:%M:%S')

If we want that it can be done in a renderer.

@asmacdo asmacdo added the semver-minor Increment the minor version when merged label Oct 9, 2024
Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.00%. Comparing base (af1167d) to head (7f2bc77).
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
- Coverage   94.17%   94.00%   -0.18%     
==========================================
  Files           2        2              
  Lines         567      567              
  Branches       88       65      -23     
==========================================
- Hits          534      533       -1     
- Misses         21       22       +1     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yarikoptic yarikoptic merged commit aac696f into con:main Oct 22, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Increment the minor version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add time started and time finished to info.json
2 participants