Buildbot/Talos/DataFormat: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 83: Line 83:
  intervalEND,valueEND,page_id
  intervalEND,valueEND,page_id
  END
  END


==== Examples ====
==== Examples ====
Line 140: Line 142:
   
   
  RETURN\tSuccess
  RETURN\tSuccess
==== Schema for AMO Perf Results Storage ====
[http://paste.pocoo.org/show/281491/ perf_results & perf_appversion tables]
NOTE: need mapping between what talos is sending and what we want to insert into these tables.
CREATE TABLE `perf_results` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `addon_id` int(11) unsigned NOT NULL,
    `appversion_id` int(11) unsigned NOT NULL,
    `average` float NOT NULL default 0,
    `os` varchar(255) NOT NULL default '',
    `test` enum('ts'),
    `created` datetime NOT NULL,
    `modified` datetime NOT NULL,
    PRIMARY KEY  (`id`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `perf_appversions` (
    `id` int(11) unsigned NOT NULL auto_increment,
    `app` enum('fx'),
    `version` varchar(255) NOT NULL default '',
    `created` datetime NOT NULL,
    `modified` datetime NOT NULL,
    PRIMARY KEY  (`id`)
) DEFAULT CHARSET=utf8;
ALTER TABLE `perf_results` ADD CONSTRAINT `perf_results_addon_id_key` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`);
ALTER TABLE `perf_results` ADD CONSTRAINT `perf_results_appversion_key` FOREIGN KEY (`appversion_id`) REFERENCES `perf_appversions` (`id`);

Revision as of 23:16, 25 October 2010

Talos Data Formatting

Data is packaged as a file in an HTTP post object.

VALUES/AVERAGE

Two different types of data to be sent:

  1. A single value to be stored as the 'average' in the test_runs table
  2. A set of (interval, value) pairs to be stored in the test_run_values table, 'average' to be calculated by collector script

First type will be called 'AVERAGE' second called 'VALUES'. All data is formatted using comma separated notation.

date_run = seconds since epoch (linux time stamp) page_name = is unique to pages when combined with the pageset_id from test table

  • for sending interval, value pairs
START
VALUES
machine_name,test_name,branch_name,ref_changeset,ref_build_id,date_run
interval0,value0,page_name0
interval1,value1,page_name1
...
intervalEND,valueEND,page_id
END
  • for sending a single value
 START
 AVERAGE
 machine_name,test_name,branch_name,ref_changeset,ref_build_id,date_run
 value0
 END

Examples

values input:

START
VALUES
machine_1, test_1, branch_1, changeset_1, 13, 1229477017
1,1.0,page_01
2,2.0,page_02
3,3.0,page_03
4,1.0,page_04
5,2.0,page_05
6,3.0,page_06
7,1.0,page_07
8,2.0,page_08
9,3.0,page_09
10,1.0,page_10
11,2.0,page_11
12,3.0,page_12
END

response:

Content-type: text/plain 

RETURN\ttest_1\tgraph.html#type=series&tests=[{"test":45,"branch":3455,"machine":234,"testrun"=6667}]
RETURN\ttest_1\t2.00\tgraph.html#tests=[{"test":45,"branch":3455,"machine":234}]

average input:

START
AVERAGE
machine_1, test_1, branch_1, changeset_1, 13, 1229477017
2.0
END

response:

Content-type: text/plain

RETURN\ttest_1\t2.00\tgraph.html#tests=[{"test":45,"branch":3455,"machine":234}]

AMO

Proposed 3rd type will be called 'AMO'. Return code simple Success/Failure. All data is formatted using comma separated notation.

date_run = seconds since epoch (linux time stamp) page_name = is unique to pages when combined with the pageset_id from test table

START
AMO
browser_name,browser_version,addon_id
machine_name,test_name,branch_name,ref_changeset,ref_build_id,date_run
interval0,value0,page_name0
interval1,value1,page_name1
...
intervalEND,valueEND,page_id
END


Examples

From a Pageload Test
START
AMO
Firefox,3.6,1066
machine_1, tp4, branch_1, changeset_1, 13, 1229477017
1,1.0,page_01
2,2.0,page_02
3,3.0,page_03
4,1.0,page_04
5,2.0,page_05
6,3.0,page_06
7,1.0,page_07
8,2.0,page_08
9,3.0,page_09
10,1.0,page_10
11,2.0,page_11
12,3.0,page_12
END

response:

Content-type: text/plain 

RETURN\tSuccess
From a Startup Test
START
AMO
Firefox,3.6,1066
machine_1, ts, branch_1, changeset_1, 13, 1229477017
1,1500,NULL
2,862,NULL
3,863,NULL
4,860,NULL
5,865,NULL
6,865,NULL
7,867,NULL
8,865,NULL
9,870,NULL
10,889,NULL
11,865,NULL
12,864,NULL
13,864,NULL
14,870,NULL
15,871,NULL
16,869,NULL
17,868,NULL
18,870,NULL
19,864,NULL
20,865,NULL
END

response:

Content-type: text/plain 

RETURN\tSuccess

Schema for AMO Perf Results Storage

perf_results & perf_appversion tables

NOTE: need mapping between what talos is sending and what we want to insert into these tables.

CREATE TABLE `perf_results` (
   `id` int(11) unsigned NOT NULL auto_increment,
   `addon_id` int(11) unsigned NOT NULL,
   `appversion_id` int(11) unsigned NOT NULL,
   `average` float NOT NULL default 0,
   `os` varchar(255) NOT NULL default ,
   `test` enum('ts'),
   `created` datetime NOT NULL,
   `modified` datetime NOT NULL,
   PRIMARY KEY  (`id`)
) DEFAULT CHARSET=utf8;
CREATE TABLE `perf_appversions` (
   `id` int(11) unsigned NOT NULL auto_increment,
   `app` enum('fx'),
   `version` varchar(255) NOT NULL default ,
   `created` datetime NOT NULL,
   `modified` datetime NOT NULL,
   PRIMARY KEY  (`id`)
) DEFAULT CHARSET=utf8;
ALTER TABLE `perf_results` ADD CONSTRAINT `perf_results_addon_id_key` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`);
ALTER TABLE `perf_results` ADD CONSTRAINT `perf_results_appversion_key` FOREIGN KEY (`appversion_id`) REFERENCES `perf_appversions` (`id`);