So.. here's what was raw SQL that is needed:

/* FIRST VIEW TABLE */

CREATE VIEW `tko_perf_view` AS select `tko_tests`.`test_idx` AS
`test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS
`test`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx` AS
`kernel_idx`,`tko_tests`.`status` AS `status`,`tko_tests`.`reason` AS
`reason`,`tko_tests`.`machine_idx` AS
`machine_idx`,`tko_tests`.`started_time` AS
`test_started_time`,`tko_tests`.`finished_time` AS
`test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label`
AS `job_label`,`tko_jobs`.`username` AS
`job_username`,`tko_jobs`.`queued_time` AS
`job_queued_time`,`tko_jobs`.`started_time` AS
`job_started_time`,`tko_jobs`.`finished_time` AS
`job_finished_time`,`tko_machines`.`hostname` AS
`machine_hostname`,`tko_machines`.`machine_group` AS
`machine_group`,`tko_machines`.`owner` AS
`machine_owner`,`tko_kernels`.`kernel_hash` AS
`kernel_hash`,`tko_kernels`.`base` AS
`kernel_base`,`tko_kernels`.`printable` AS
`kernel_printable`,`tko_status`.`word` AS
`status_word`,`tko_iteration_result`.`iteration` AS
`iteration`,`tko_iteration_result`.`attribute` AS
`iteration_key`,`tko_iteration_result`.`value` AS `iteration_value`
from (((((`tko_tests` join `tko_jobs` on((`tko_jobs`.`job_idx` =
`tko_tests`.`job_idx`))) join `tko_machines`
on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) join
`tko_kernels` on((`tko_kernels`.`kernel_idx` =
`tko_tests`.`kernel_idx`))) join `tko_status`
on((`tko_status`.`status_idx` = `tko_tests`.`status`))) join
`tko_iteration_result` on((`tko_iteration_result`.`test_idx` =
`tko_tests`.`test_idx`)));


/* SECOND VIEW TABLE */

CREATE VIEW `tko_perf_view_2` AS select `tko_tests`.`test_idx` AS
`test_idx`,`tko_tests`.`job_idx` AS `job_idx`,`tko_tests`.`test` AS
`test_name`,`tko_tests`.`subdir` AS `subdir`,`tko_tests`.`kernel_idx`
AS `kernel_idx`,`tko_tests`.`status` AS
`status_idx`,`tko_tests`.`reason` AS
`reason`,`tko_tests`.`machine_idx` AS
`machine_idx`,`tko_tests`.`started_time` AS
`test_started_time`,`tko_tests`.`finished_time` AS
`test_finished_time`,`tko_jobs`.`tag` AS `job_tag`,`tko_jobs`.`label`
AS `job_name`,`tko_jobs`.`username` AS
`job_owner`,`tko_jobs`.`queued_time` AS
`job_queued_time`,`tko_jobs`.`started_time` AS
`job_started_time`,`tko_jobs`.`finished_time` AS
`job_finished_time`,`tko_machines`.`hostname` AS
`hostname`,`tko_machines`.`machine_group` AS
`platform`,`tko_machines`.`owner` AS
`machine_owner`,`tko_kernels`.`kernel_hash` AS
`kernel_hash`,`tko_kernels`.`base` AS
`kernel_base`,`tko_kernels`.`printable` AS
`kernel`,`tko_status`.`word` AS
`status`,`tko_iteration_result`.`iteration` AS
`iteration`,`tko_iteration_result`.`attribute` AS
`iteration_key`,`tko_iteration_result`.`value` AS `iteration_value`
from (((((`tko_tests` left join `tko_jobs` on((`tko_jobs`.`job_idx` =
`tko_tests`.`job_idx`))) left join `tko_machines`
on((`tko_machines`.`machine_idx` = `tko_jobs`.`machine_idx`))) left
join `tko_kernels` on((`tko_kernels`.`kernel_idx` =
`tko_tests`.`kernel_idx`))) left join `tko_status`
on((`tko_status`.`status_idx` = `tko_tests`.`status`))) left join
`tko_iteration_result` on((`tko_iteration_result`.`test_idx` =
`tko_tests`.`test_idx`)))

/* DROP PRIMARY KEY */
ALTER TABLE tko_iteration_result DROP PRIMARY KEY;

The primary key drop is needed since there will be duplicate entries.

I put together a migration for this but never got around to testing it.

//geoff


On Tue, Apr 15, 2014 at 3:46 PM, geoffrey papilion
<[email protected]> wrote:
> I believe it was due to the update of the migrations scripts in 0.15?
> I filed an issue about it on github.
>
> I'll send the stuff over to you, when I'm done with some meetings.
>
> //geoff
>
> On Tue, Apr 15, 2014 at 3:33 PM, Josh Hunt <[email protected]> wrote:
>> Geoff
>>
>> That would be great if you could send me what you have.
>>
>> Do you know why the table is missing? Was it deleted on accident/purpose as
>> part of some cleanup? Or did I miss some steps during setup/install?
>>
>> Thanks
>> Josh
>>
>>
>> On 04/15/2014 05:02 PM, geoffrey papilion wrote:
>>>
>>> I've had issues with this in the past, and have recreated the tables.
>>> I was working on south migrations but haven't pushed them up. I can
>>> send you the raw SQL if you'd like.
>>>
>>> //geoff
>>>
>>> On Tue, Apr 15, 2014 at 2:52 PM, Josh Hunt <[email protected]> wrote:
>>>>
>>>> I'm interested in being able to compare performance results in autotest
>>>> and
>>>> was trying to use the preconfigured "kernel_compare" results, but it is
>>>> returning an error:
>>>>
>>>> ProgrammingError: (1146, "Table 'autotest_web.tko_perf_view_2' doesn't
>>>> exist")
>>>>
>>>> This is on the "graphing" page of the results db. I select
>>>> "kernel_compare"
>>>> from the Preconfigured dropdown box, and then hit graph and I get the
>>>> above
>>>> error.
>>>>
>>>>  From the cmdline I checked my mysqldb and see that there is no table
>>>> named
>>>> tko_perf_view_2 in there.
>>>>
>>>> I'm running autotest 0.15.1. This machine is running Ubuntu 12.04.3 LTS
>>>> and
>>>> was installed using the autotest setup script.
>>>>
>>>> If this is not a known issue resolved in a later release, please let me
>>>> know
>>>> what information you'd like me to provide to debug this. We can also
>>>> discuss
>>>> further @ #autotest.
>>>>
>>>> In addition to the above error I'm more generally interested in being
>>>> able
>>>> to compare performance results b/t benchmarks run in autotest. However, I
>>>> do
>>>> not see the perf keyvals being added to the tko_iteration_result table
>>>> like
>>>> I was expecting. I realize this is a separate issue/question.
>>>>
>>>> Thanks
>>>> Josh
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Autotest-kernel mailing list
>>>> [email protected]
>>>> https://www.redhat.com/mailman/listinfo/autotest-kernel

_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to