Use latets commit date when building latest benchmark results

This commit is contained in:
2017-08-27 19:10:29 +02:00
parent 2cd38e40a5
commit 48c1d0fd09
2 changed files with 14 additions and 2 deletions

View File

@@ -1,3 +1,4 @@
import dateutil
import foundation
from foundation import progress
import os
@@ -123,6 +124,15 @@ def stripSensitiveInfo(s):
s = s.replace(root_dir, "<FARM_DIR>")
return s
def blenderCommitUnixTimestamp(commit_date, commit_time):
"""
Convert commit build time and time to unix timestamp
"""
date_time = commit_date + " " + commit_time
return dateutil.parser.parse(date_time)
########################################
# Directories manipulation.
########################################

View File

@@ -1,7 +1,6 @@
#!/usr/bin/env python3
import argparse
import dateutil
import foundation
import json
import os
@@ -160,7 +159,10 @@ class LatestResultVisitor(ResultVisitor):
def copyUsableStats(self, device, results):
stats = results['stats']
timestamp = dateutil.parser.parse(results['timestamp'])
blender_version = results['blender_version']
timestamp = util.blenderCommitUnixTimestamp(
blender_version ['build_commit_date'],
blender_version ['build_commit_time'])
for scene_name in stats:
stat = stats[scene_name]
# Ignore benchmark results which crashed or aborted.