Skip to content

Commit

Permalink
use the metadata for artifacts location
Browse files Browse the repository at this point in the history
  • Loading branch information
sadiqj committed Jul 31, 2019
1 parent 1b3b4b4 commit 55d0b64
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 2.1.10 on 2019-07-31 21:46
# Generated by Django 2.1.10 on 2019-07-31 22:11

from django.db import migrations
import jsonfield.fields
Expand All @@ -13,7 +13,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AddField(
model_name='result',
name='meta_data',
name='metadata',
field=jsonfield.fields.JSONField(default='{}'),
preserve_default=False,
),
Expand Down
4 changes: 2 additions & 2 deletions codespeed/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class Result(models.Model):
Benchmark, on_delete=models.CASCADE, related_name="results")
environment = models.ForeignKey(
Environment, on_delete=models.CASCADE, related_name="results")
meta_data = JSONField()
metadata = JSONField()

def __str__(self):
return u"%s: %s" % (self.benchmark.name, self.value)
Expand Down Expand Up @@ -543,7 +543,7 @@ def get_changes_table(self, trend_depth=10, force_save=False):
'val_max': val_max,
'change': change,
'trend': trend,
'artifacts_location': "{}/{}/".format(self.revision.commitid, bench.name)
'artifacts_location': resobj.metadata.get('artifacts_location', '')
})

# Compute Arithmetic averages
Expand Down
2 changes: 1 addition & 1 deletion codespeed/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def save_result(data, update_repo=True):
r.val_max = data.get('max')
r.q1 = data.get('q1')
r.q3 = data.get('q3')
r.meta_data = data.get('metadata')
r.metadata = data.get('metadata')

r.full_clean()
r.save()
Expand Down

0 comments on commit 55d0b64

Please sign in to comment.