summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVictor Brunini <vebruni@sandia.gov>2023-12-07 11:32:10 -0800
committerGitHub <noreply@github.com>2023-12-07 19:32:10 +0000
commit0a6045eadfd1cd0613d4bb3265c112b2b6e71504 (patch)
tree9241cc9d5d927721545d87864a69ee927b3e7047 /lib
parent5722a13af0fefdaab645ef287981d584bb51eef8 (diff)
downloadspack-0a6045eadfd1cd0613d4bb3265c112b2b6e71504.tar.gz
spack-0a6045eadfd1cd0613d4bb3265c112b2b6e71504.tar.bz2
spack-0a6045eadfd1cd0613d4bb3265c112b2b6e71504.tar.xz
spack-0a6045eadfd1cd0613d4bb3265c112b2b6e71504.zip
Fix cdash reporter time stamps (#38825)
* Fix cdash reporter time stamps (#38818). The cdash reporter is created before packages are installed so save the starttime then instead of the endtime. * Use endtime instead of starttime for the endtime of update --------- Co-authored-by: Tamara Dahlgren <dahlgren1@llnl.gov>
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/reporters/cdash.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/spack/spack/reporters/cdash.py b/lib/spack/spack/reporters/cdash.py
index 3c538418f6..e397a52be5 100644
--- a/lib/spack/spack/reporters/cdash.py
+++ b/lib/spack/spack/reporters/cdash.py
@@ -92,11 +92,11 @@ class CDash(Reporter):
self.osname = platform.system()
self.osrelease = platform.release()
self.target = spack.platforms.host().target("default_target")
- self.endtime = int(time.time())
+ self.starttime = int(time.time())
self.buildstamp = (
configuration.buildstamp
if configuration.buildstamp
- else build_stamp(configuration.track, self.endtime)
+ else build_stamp(configuration.track, self.starttime)
)
self.buildIds: Dict[str, str] = {}
self.revision = ""
@@ -125,7 +125,7 @@ class CDash(Reporter):
report_data[phase] = {}
report_data[phase]["loglines"] = []
report_data[phase]["status"] = 0
- report_data[phase]["endtime"] = self.endtime
+ report_data[phase]["starttime"] = self.starttime
# Track the phases we perform so we know what reports to create.
# We always report the update step because this is how we tell CDash
@@ -179,9 +179,9 @@ class CDash(Reporter):
build_pos = phases_encountered.index("build")
phases_encountered.insert(0, phases_encountered.pop(build_pos))
- self.starttime = self.endtime - duration
+ self.endtime = self.starttime + duration
for phase in phases_encountered:
- report_data[phase]["starttime"] = self.starttime
+ report_data[phase]["endtime"] = self.endtime
report_data[phase]["log"] = "\n".join(report_data[phase]["loglines"])
errors, warnings = parse_log_events(report_data[phase]["loglines"])
@@ -328,7 +328,7 @@ class CDash(Reporter):
self.buildname = "{0}-{1}".format(self.current_package_name, package["id"])
else:
self.buildname = self.report_build_name(self.current_package_name)
- self.starttime = self.endtime - duration
+ self.endtime = self.starttime + duration
report_data = self.initialize_report(report_dir)
report_data["hostname"] = socket.gethostname()
@@ -373,7 +373,7 @@ class CDash(Reporter):
self.buildname = self.base_buildname
report_data = self.initialize_report(report_dir)
report_data["update"] = {}
- report_data["update"]["starttime"] = self.endtime
+ report_data["update"]["starttime"] = self.starttime
report_data["update"]["endtime"] = self.endtime
report_data["update"]["revision"] = self.revision
report_data["update"]["log"] = msg