How to change the report summary limit from 64 to a higher limit?

19 views
Skip to first unread message

Stefan Marr

unread,
Aug 22, 2012, 7:18:29 PM8/22/12
to code...@googlegroups.com
Hi:

This is mostly a question about the data model, and what the 'correct' approach is to change it.
I am not familiar with the underlying frameworks and don't know exactly whether changing the schema definition in the databased table would be sufficient.

My problem is that I have insanely long benchmark names, encoding all kind of parameters.
This leads to the problem, that the server returns a 500er error and logs: ValidationError: {'summary': [u'Ensure this value has at most 64 characters (it has 92).']}
when I try to submit benchmark results via the JSON interface.

How do I correctly change the length of the summary of a `report` to for instance 128 characters?

Thanks
Stefan

Miquel Torres

unread,
Aug 24, 2012, 8:01:02 AM8/24/12
to code...@googlegroups.com
Hi Stefan,

yes, changing models.Report.summary length to 128 would be enough.
Then add a South migration for it, then apply it to migrate your DB.

What I wonder though is, it should be impossible for the summary to be
too long, because the benchmark name length is itself only 30!:
https://github.com/tobami/codespeed/blob/master/codespeed/models.py#L134

Have you hot-patched your Codespeed deployment?


2012/8/23 Stefan Marr <goo...@stefan-marr.de>:

Stefan Marr

unread,
Aug 24, 2012, 8:26:25 AM8/24/12
to code...@googlegroups.com
Hi Miquel:


On Friday, August 24, 2012 2:01:02 PM UTC+2, Miquel Torres wrote:
yes, changing models.Report.summary length to 128 would be enough.
Then add a South migration for it, then apply it to migrate your DB.

Thanks, will try that when I find the time.

 
What I wonder though is, it should be impossible for the summary to be
too long, because the benchmark name length is itself only 30!:
https://github.com/tobami/codespeed/blob/master/codespeed/models.py#L134

Have you hot-patched your Codespeed deployment?

I don't remember well, but I would not think so.
I assume that these things are not actually checked and enforced consistently.

For instance, I can delete the reports in the admin pannel, and then they are correctly generated without complaining about the length.
Examples are:

SMarkSlopstone (1 cores, benchmarking.image ReBenchHarness 1 1 3000) +42.9%
SMarkSlopstone (2 cores, benchmarking.image ReBenchHarness 2 1 3000) +7.1%
LRSTMLoops.Send (1 cores, pharo-omni.image SMarkHarness 1 1 5000000) +17.4%
ATLoops.InstVarAccess (1 cores, pharo-omni.image SMarkHarness 1 1 900000) +32.5%
ATLoops.ArrayAccess (1 cores, pharo-omni.image SMarkHarness 1 1 2000000) +12.3%
ATLoops.ATInstVarAccess (1 cores, pharo-omni.image SMarkHarness 1 1 900000) +28.3%
SMarkSlopstone (2 cores, benchmarking.image ReBenchHarness 2 1 3000) +13.3%
GameSuite.Chameleons (2 cores, benchmarking.image ReBenchHarness 2 1 10000) +11.4%
GameSuite.Chameleons (1 cores, benchmarking.image ReBenchHarness 1 1 10000) +4.6%

And all these benchmark names are well beyond 30 characters.

To me it seems it is a minor issue anyway, the actual data seems to end up in the database, and only the report is not properly updated.
I will just work around (ignore) it for the moment.

Thanks
Stefan


Miquel Torres

unread,
Aug 24, 2012, 10:38:07 AM8/24/12
to code...@googlegroups.com
Still, could you look at your models.py and see whether Benchmark.name
has a max length greater than 30. If that is the case, do you need it,
and would like to have it modified in master?


2012/8/24 Stefan Marr <goo...@stefan-marr.de>:

Stefan Marr

unread,
Aug 24, 2012, 10:57:11 AM8/24/12
to code...@googlegroups.com
On Friday, August 24, 2012 4:38:07 PM UTC+2, Miquel Torres wrote:
Still, could you look at your models.py and see whether Benchmark.name
has a max length greater than 30. If that is the case, do you need it,
and would like to have it modified in master?
It is untouched as of b5f2c29d58870e51a9c609d52ac8543f9af2c86c.
So, the max length is indeed just 30.
Reply all
Reply to author
Forward
0 new messages