<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"><channel><title>k0s's blog</title><link>http://k0s.org/mozilla/blog</link><description>latest blog entries for k0s on mozilla-blog</description><lastBuildDate>Fri, 18 May 2012 19:03:29 GMT</lastBuildDate><generator>PyRSS2Gen-1.0.0</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Automation and Testing : Overhaul of Talos Configuration</title><link>http://k0s.org/mozilla/blog/20120514090316</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Automation and Testing : Overhaul of Talos Configuration&lt;/p&gt;
&lt;p&gt;Last week I pushed a fix to
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704654"&gt;bug 704654&lt;/a&gt;
that fixes a number of issues, conceptual and user-facing, with how
Talos handles configuration.  I've had an idea on how I wanted to do
this for a few months now, but it has always been tabled.  But with my
(joking, sorry) pledge to Bob Moss to fix all bugs in
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt;
by the end of quarter.&lt;/p&gt;
&lt;p&gt;I had a free weekend so instead of killing the prerequisite bugs as I
usually do I decided to tackle the problem in one go.
My goals:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;remove the need to edit several different configuration to change a
configuration basis.  Most .config edits needed to happen in
5 places (formerly 6).  This is not only prone to human error (which
I and others have been guilty of many times), it is
a discouragement to change default configuration.&lt;/li&gt;
&lt;li&gt;consistent and declarative serialization/deserialization. Serialization in
PerfConfigurator was mostly awful, scanning through line by line and
looking for particular strings in (basically) an if-else tree, often
depending on particular whitespace or other subtle (and
undocumented) formatting issues.  While the .config files conform to
YAML, we don't make use of this for de/serialization.  In addition,
while in run_tests.py we allow command line overrides for the YAML
items, we do not post-process them as we would in
PerfConfigurator.&lt;/li&gt;
&lt;li&gt;consistent error checking.  Currently some of our config-checking is
in PerfConfigurator and some is done in run_tests.  This opens the
possibility that either case may miss cases where the other one
would find it. If you call run_tests.py with a .yml file, you will
not get the checking done for the combination of command line items
and the .yml configuration that is done in PerfConfigurator.  Since
we process a lot of command line items into resulting configuration,
this can lead to interesting results (e.g. while --activeTests is a
command line item for run_tests.py, it is not used, anywhere).
In general, configuration should be checked in one place before any
program logic takes place.  While this patch doesn't completely
address this issue, it a big step forward and should pave the way
for future improvement.&lt;/li&gt;
&lt;li&gt;configuration should be declarative.  You should get what you expect
from configuration, not inconsistent results.  If you edit a (e.g.)
.yml file with the existing Talos, you have no real way to know if
the keys you add or edit are going to be used by run_tests.py (and
what format they should be in, etc.) Having a basis for
configuration gives a single place to denote what is expected (and
thereby what isn't allowed) and the form that it is supposed to be
in. It is also nice to have all configuration in a single place
instead of having to look at a bunch of config files for the basis
as well as all over the code to see what is expected and how it is
processed.&lt;/li&gt;
&lt;li&gt;allow running directly from run_test.py . For particular
(e.g. production) systems, it may be advisable to use tuned
(.yml) configuration files to have highly customized runs (note that
we &lt;em&gt;don't&lt;/em&gt; do this and use (remote)PerfConfigurator in all cases for
reasons that may be infered from the above). However, for a typical
developer, there is little reason to run
&lt;tt class="docutils literal"&gt;PerfConfigurator &lt;span class="pre"&gt;-e&lt;/span&gt; `which firefox` &lt;span class="pre"&gt;-a&lt;/span&gt; ts &lt;span class="pre"&gt;--develop&lt;/span&gt; &lt;span class="pre"&gt;-o&lt;/span&gt; ts.yml &amp;amp;&amp;amp; talos &lt;span class="pre"&gt;-n&lt;/span&gt; &lt;span class="pre"&gt;-d&lt;/span&gt; ts.yml&lt;/tt&gt;
for a particular run.  Instead, the entirety of this may be invoked
with this patch as
&lt;tt class="docutils literal"&gt;talos &lt;span class="pre"&gt;-n&lt;/span&gt; &lt;span class="pre"&gt;-d&lt;/span&gt; &lt;span class="pre"&gt;-e&lt;/span&gt; `which firefox` &lt;span class="pre"&gt;-a&lt;/span&gt; ts &lt;span class="pre"&gt;--develop&lt;/span&gt; &lt;span class="pre"&gt;-o&lt;/span&gt; ts.yml&lt;/tt&gt;
in a one-step process.  (Note that we're still dumping to &lt;tt class="docutils literal"&gt;ts.yml&lt;/tt&gt;
though one wouldn't have to if the result is intended as ephemeral).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I hear people prefer blog posts with pictures, so with no reason here
is a bunch of cute foxes:&lt;/p&gt;
&lt;img alt="/mozilla/images/panda_adoption.jpg" src="/mozilla/images/panda_adoption.jpg" /&gt;
&lt;p&gt;I've moved the basis of the Talos configuration to
&lt;a class="reference external" href="http://hg.mozilla.org/build/talos/file/7fd63f3ef011/talos/PerfConfigurator.py"&gt;PerfConfigurator.py&lt;/a&gt;
instead of some combination of .config files, PerfConfigurator.py, and
run_tests.py.
This gets rid of the duplication between the various config files as
well as the command line options.  In fact, there isn't much left of
the configuration files&lt;/p&gt;
&lt;p&gt;I don't like configuration to live in code, and so empathize with
those who look at this cautiously from that point of view.  However,
PerfConfigurator following my rework isn't so much configuration, but
a configuration basis.  Given the goals above, some piece of code has
to validate a given configuration, has to know what data is in a
configuration, and has to provide whatever command line options are
used to front-end the configuration.  The previous incarnation of
Talos and PerfConfigurator had a significant amount of code to this
end, but it was both spread out and incomplete.  So I don't think
putting it all in one place is a big conceptual change.  Having a
piece of code that knows the allowable form of configuration gives
great power and having the code all in one place just makes it more
human-readable.&lt;/p&gt;
&lt;p&gt;The unofficial history of Talos configuration, as I understand it,
goes something like this:  Initially, there was one configuration
file.  You copied it, edited it by hand, and ran your tests on it.  At
some point, this became cumbersome, and PerfConfigurator was created
to automatically fill in values from a set of command-line choices,
and in addition allow the values to be marked up a bit.  The road was
already paved for some part of configuration basis living in code
versus in the .config file. Then, as the need to run tests in
different configurations grew, .config files flourished to this
end. I'd like to think the changes for
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=704654"&gt;bug 704654&lt;/a&gt; as
the next logical step in Talos's configuration evolution.&lt;/p&gt;
&lt;p&gt;Longer term, we'd like to remove even more of Talos's configuration and
replace .yml files with command line options. The complexity of
configuration will be managed by
&lt;a class="reference external" href="http://escapewindow.com/mozharness/"&gt;mozharness&lt;/a&gt; .&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120514090316</guid><pubDate>Mon, 14 May 2012 09:03:16 GMT</pubDate></item><item><title>Automation and Testing : Considering a Page-Centric Talos</title><link>http://k0s.org/mozilla/blog/20120425093346</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Automation and Testing : Considering a Page-Centric Talos&lt;/p&gt;
&lt;p&gt;Currently, the canonical unit of Talos tests is a page set.
However, a page-centric point of view offers several intrinsic
advantages on top of being, in my opinion, more conceptually coherent.&lt;/p&gt;
&lt;p&gt;A page-centric point of view allows easy adding and updating of
pages. Currently, making a new page set is a big deal.  Since we
average over all pages in a page set to obtain a quality metric,
adding a new page (or removing a page) will change this number and
the entire baseline for comparison has to be recentered.  If we
made the page the canonical unit of testing, then adding or
removing a page doesn't involve a recentering as each page has a
quality metric associated with it.&lt;/p&gt;
&lt;p&gt;Taking an average over all pages to get a quality metric, as we do,
gives a higher weight to pages that take (e.g.) longer to load. For
instance, consider the output for &lt;tt class="docutils literal"&gt;tsvg&lt;/tt&gt;:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
|i|pagename|runs|
|0;gearflowers.svg;79;65;68;68;67
|1;composite-scale.svg;46;35;44;41;42
|2;composite-scale-opacity.svg;21;22;24;22;20
|3;composite-scale-rotate.svg;23;21;21;20;19
|4;composite-scale-rotate-opacity.svg;19;24;19;19;23
|5;hixie-001.xml;45643;14976;17807;14971;17235
|6;hixie-002.xml;51257;15193;21693;14969;14974
|7;hixie-003.xml;5016;37375;5021;5024;5008
|8;hixie-004.xml;5052;5053;5054;5054;5053
|9;hixie-005.xml;4618;4533;4611;4532;4554
|10;hixie-006.xml;5059;5107;9741;5107;5089
|11;hixie-007.xml;1629;1651;1648;1652;1649
&lt;/pre&gt;
&lt;p&gt;A performance loss (or gain) in e.g. &lt;tt class="docutils literal"&gt;gearflowers.svg&lt;/tt&gt; is likely not
to be noticed in this pageset as it is several orders of magnitude
lower than (e.g.) &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;hixie-002.xml&lt;/span&gt;&lt;/tt&gt;, so a small percentage-wise noise
in the latter could easily hide a legitimate regression in the former.&lt;/p&gt;
&lt;p&gt;Having this additional data of what changes regress which pages allows
us to explore how these particular page modifications affect
performance. If we can isolate patterns, we can fix them.&lt;/p&gt;
&lt;p&gt;One conceptual disadvantage to a page-centric approach is that
deciding whether a changeset is a net regression or not becomes
harder.  Ideally a human (or other expert system) would evaluate all
of the data across pages and decide whether a change is a regression
or not.  However, we have many pages and not enough people, so this is
harder to do than to craft a formula for a quality metric.
To obtain an overall quality metric for a push, some sort of averaging
over pages must be done.  We currently throw away the highest value
and take the mean of remaining page averages.  If we continue with
this approach we throw away the ability easily add and remove pages
without futzing with the metric.  Instead, a method should be sought
whereby adding a new page does not affect a metric.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120425093346</guid><pubDate>Wed, 25 Apr 2012 09:33:46 GMT</pubDate></item><item><title>Talos Signal from Noise: Configurable Talos Data Filters</title><link>http://k0s.org/mozilla/blog/20120215124438</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Talos Signal from Noise: Configurable Talos Data Filters&lt;/p&gt;
&lt;p&gt;As part of
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/Signal_From_Noise"&gt;Signal from Noise&lt;/a&gt;
I introduced a patch that changes the way &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--ignoreFirst&lt;/span&gt;&lt;/tt&gt; works and
adds configurable data filters to
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt; :&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=723569"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=723569&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;landed as &lt;a class="reference external" href="http://hg.mozilla.org/build/talos/rev/5d955efe4678"&gt;http://hg.mozilla.org/build/talos/rev/5d955efe4678&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;While this is a small change in terms of how the code currently works,
it lays the groundwork for a window of possibilities in terms of Talos
statistics.  Currently, pageloader calculates the &amp;quot;median&amp;quot; (ignoring
the high value), the mean, the max, and the min, and outputs these
along with the raw run data.  Pageloader is for loading pages and
taking measurements, not really for doing statistics.  So it would be
nice to move this upstream: first to Talos, then to graphserver proper.&lt;/p&gt;
&lt;p&gt;Being able to specify data filters with &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--filter&lt;/span&gt;&lt;/tt&gt; from the command
line and &lt;tt class="docutils literal"&gt;filter:&lt;/tt&gt; in the &lt;tt class="docutils literal"&gt;.yml&lt;/tt&gt; configuration file allows the
test-runner to change the &amp;quot;interesting number&amp;quot; by which we measure
performance metrics on the fly.  While there are currently only a few
filters available, it is easy to add more metrics as we need them.&lt;/p&gt;
&lt;p&gt;In a parallel effort, the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/JetPerf"&gt;JetPerf&lt;/a&gt;
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/jetperf"&gt;software&lt;/a&gt;
consumes Talos
&lt;a class="reference external" href="http://hg.mozilla.org/build/talos/file/tip/talos/filter.py"&gt;filters&lt;/a&gt;
. This is a good example of the expansion of the Talos ecosystem: as a
ciritical part of our performance testing infrastructure, building
tests and frameworks on top of Talos.  In general, the
&lt;a class="reference external" href="http://wiki.mozilla.org/Auto-tools"&gt;A Team&lt;/a&gt; is moving towards a
testing ecosystem of reusable parts and sane APIs.&lt;/p&gt;
&lt;p&gt;Data filters were added to talos
as an interim measure to make the &amp;quot;interesting number&amp;quot; calculations
more flexible.  As we play with different types of statistics, we need
the ability to change configuration without having to jump through too
many hoops and this fulfills this immediate need.&lt;/p&gt;
&lt;p&gt;However, in the longer term, Talos and pageloader shouldn't really be
doing statistics at all.  They are in the &amp;quot;statistics gathering&amp;quot; camp
where
&lt;a class="reference external" href="https://wiki.mozilla.org/Perfomatic"&gt;graphserver&lt;/a&gt; is in the
&amp;quot;statistics processing&amp;quot; business.  It would also be nice if there was
a piece of software that let you analyze Talos results locally,
ideally using the same statistics processing package that &lt;tt class="docutils literal"&gt;graphserver&lt;/tt&gt; uses.
This is outlined in
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=721902"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=721902&lt;/a&gt; .&lt;/p&gt;
&lt;img alt="http://k0s.org/mozilla/talos/bug-721902.gv.txt" src="http://k0s.org/mozilla/talos/bug-721902.gv.txt" /&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120215124438</guid><pubDate>Wed, 15 Feb 2012 12:44:38 GMT</pubDate></item><item><title>Talos Signal from Noise: analyzing the data</title><link>http://k0s.org/mozilla/blog/20120131164249</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Talos Signal from Noise: analyzing the data&lt;/p&gt;
&lt;p&gt;Recently, a change was pushed as part of the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/Signal_From_Noise"&gt;Signal from Noise&lt;/a&gt;
effort in order to make
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt;
statistics better: &lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=710484"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=710484&lt;/a&gt;
The idea being that the way were are doing things is skewing the data
and not helping with noise.&lt;/p&gt;
&lt;p&gt;Currently,
&lt;a class="reference external" href="http://hg.mozilla.org/build/pageloader/"&gt;pageloader&lt;/a&gt;
calculates the median after throwing out the highest point:
&lt;a class="reference external" href="http://hg.mozilla.org/build/pageloader/file/beca399c3a16/chrome/report.js#l114"&gt;http://hg.mozilla.org/build/pageloader/file/beca399c3a16/chrome/report.js#l114&lt;/a&gt;
We introduced &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;--ignoreFirst&lt;/span&gt;&lt;/tt&gt; to instead ignore the first point and
calculate the median of the remaining runs.&lt;/p&gt;
&lt;p&gt;However, after introducing the change we noticed that our distribution
had gone bimodal during side by side staging:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="http://people.mozilla.org/~jmaher/sxs/sxs.html"&gt;http://people.mozilla.org/~jmaher/sxs/sxs.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="http://graphs-new.mozilla.org/graph.html#tests=[[170,1,21],[57,1,21]]&amp;amp;sel=1327791635000,1328041307110&amp;amp;displayrange=7&amp;amp;datatype=running"&gt;http://graphs-new.mozilla.org/graph.html#tests=[[170,1,21],[57,1,21]]&amp;amp;sel=1327791635000,1328041307110&amp;amp;displayrange=7&amp;amp;datatype=running&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Were we doing something other than what we thought we were doing? Were
our calculations wrong?  Or was something else going on?&lt;/p&gt;
&lt;p&gt;So
&lt;a class="reference external" href="http://elvis314.wordpress.com/"&gt;jmaher&lt;/a&gt;
and I dove in to take a look at the data.  &lt;em&gt;jmaher&lt;/em&gt; dug up a high-mode
and low-mode case from the TBPL logs corresponding to the push sets
displayed on
&lt;a class="reference external" href="http://graphs-new.mozilla.org/"&gt;graphserver&lt;/a&gt;&lt;/p&gt;
&lt;pre class="literal-block"&gt;
https://tbpl.mozilla.org/php/getParsedLog.php?id=8982519&amp;amp;tree=Firefox&amp;amp;full=1
high point:
NOISE: __start_tp_report
NOISE: _x_x_mozilla_page_load,109,NaN,NaN
NOISE: _x_x_mozilla_page_load_details,avgmedian|109|average|354.25|minimum|NaN|maximum|NaN|stddev|NaN
NOISE: |i|pagename|median|mean|min|max|runs|
NOISE: |0;big-optimizable-group-opacity-2500.svg;123.5;354.25;92;1130;147;1130;1078;92;100
NOISE: |1;small-group-opacity-2500.svg;109;2333.25;103;9247;103;9012;9247;111;107
NOISE: __end_tp_report


https://tbpl.mozilla.org/php/getParsedLog.php?id=8982267&amp;amp;tree=Firefox&amp;amp;full=1
low point:
NOISE: __start_tp_report
NOISE: _x_x_mozilla_page_load,108,NaN,NaN
NOISE: _x_x_mozilla_page_load_details,avgmedian|108|average|113.00|minimum|NaN|maximum|NaN|stddev|NaN
NOISE: |i|pagename|median|mean|min|max|runs|
NOISE: |0;big-optimizable-group-opacity-2500.svg;119;353.75;91;1132;139;1132;1086;91;99
NOISE: |1;small-group-opacity-2500.svg;108;113;103;9116;103;133;9116;108;108
NOISE: __end_tp_report
&lt;/pre&gt;
&lt;p&gt;From &lt;a class="reference external" href="http://pastebin.mozilla.org/1470000"&gt;http://pastebin.mozilla.org/1470000&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;Since I can't really read this being a mere human being, I modified
&lt;a class="reference external" href="http://hg.mozilla.org/build/talos/file/9c1b3addb9ee/talos/results.py"&gt;results.py&lt;/a&gt;
to parse this data:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
+
+if __name__ == '__main__':
+    import sys
+    string_high = &amp;quot;&amp;quot;&amp;quot;
+|0;big-optimizable-group-opacity-2500.svg;123.5;354.25;92;1130;147;1130;1078;92;100
+|1;small-group-opacity-2500.svg;109;2333.25;103;9247;103;9012;9247;111;107
+&amp;quot;&amp;quot;&amp;quot;
+    string_low = &amp;quot;&amp;quot;&amp;quot;
+|0;big-optimizable-group-opacity-2500.svg;119;353.75;91;1132;139;1132;1086;91;99
+|1;small-group-opacity-2500.svg;108;113;103;9116;103;133;9116;108;108
+&amp;quot;&amp;quot;&amp;quot;
+    big = PageloaderResults(string_high)
+    small = PageloaderResults(string_low)
+    import pdb; pdb.set_trace()
&lt;/pre&gt;
&lt;p&gt;This makes some explorable &lt;tt class="docutils literal"&gt;PageloaderResults&lt;/tt&gt; objects that explorable with
&lt;a class="reference external" href="http://docs.python.org/library/pdb.html"&gt;pdb&lt;/a&gt; .  While I did this for a
one-off hack, this is something we'll probably generally want as part of
Signal from Noise: &lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=722915"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=722915&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then I looked at the data:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
(Pdb) pp(small.results)
[{'index': '|0',
  'max': 1132.0,
  'mean': 353.75,
  'median': 119.0,
  'min': 91.0,
  'page': 'big-optimizable-group-opacity-2500.svg',
  'runs': [139.0, 1132.0, 1086.0, 91.0, 99.0]},
 {'index': '|1',
  'max': 9116.0,
  'mean': 113.0,
  'median': 108.0,
  'min': 103.0,
  'page': 'small-group-opacity-2500.svg',
  'runs': [103.0, 133.0, 9116.0, 108.0, 108.0]}]
(Pdb) pp(big.results)
[{'index': '|0',
  'max': 1130.0,
  'mean': 354.25,
  'median': 123.5,
  'min': 92.0,
  'page': 'big-optimizable-group-opacity-2500.svg',
  'runs': [147.0, 1130.0, 1078.0, 92.0, 100.0]},
 {'index': '|1',
  'max': 9247.0,
  'mean': 2333.25,
  'median': 109.0,
  'min': 103.0,
  'page': 'small-group-opacity-2500.svg',
  'runs': [103.0, 9012.0, 9247.0, 111.0, 107.0]}]
&lt;/pre&gt;
&lt;p&gt;You'll notice that a few things from the runs data:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;the runs data is indeed bifurcated.  In all case there is a low value,
around a hundred, and a high value in the thousands&lt;/li&gt;
&lt;li&gt;contrary to the assumption that the first datapoint may be biased and high,
you can't really see any bias, at least compared to the magnitude of
the bifurcation&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;So how does this compare to the graphserver results?
&lt;a class="reference external" href="http://graphs-new.mozilla.org/graph.html#tests=[[170,1,21],[57,1,21]]&amp;amp;sel=1327791635000,1328041307110&amp;amp;displayrange=7&amp;amp;datatype=running"&gt;http://graphs-new.mozilla.org/graph.html#tests=[[170,1,21],[57,1,21]]&amp;amp;sel=1327791635000,1328041307110&amp;amp;displayrange=7&amp;amp;datatype=running&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For the old data and the low value of the new data, we see times around
110-120ms.  The high value of the new data is around 590ms.  Are these
numbers what we'd expect?&lt;/p&gt;
&lt;p&gt;Throwing away the high value and taking the median for both data sets gives
a number of the order of 100 or so (the old algorithm).  Taking the median
functions as a filter for the bifurcated results towards the majorant
population.  Since the low population is slightly more majorant, dropping
the highest number in the way that pageloader does further biases towards it.
It is not surprising we see no bifurcation in the old data.&lt;/p&gt;
&lt;p&gt;For the new data, we drop the first run.  Coincidentally or not, for the cases
studied the first run was part of the low population, so that tends
towards bifurcation.  Taking the median of the remaining data points gives&lt;/p&gt;
&lt;p&gt;High case:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;big-optimizable-group-opacity-2500.svg : &lt;tt class="docutils literal"&gt;(1078 + 100) / 2 = 589&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;small-group-opacity-2500.svg : &lt;tt class="docutils literal"&gt;(9012 + 111) / 2 = 4561.5&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Low case:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;big-optimizable-group-opacity-2500.svg &lt;tt class="docutils literal"&gt;(99 + 1086) / 2 = 592.5&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;small-group-opacity-2500.svg : &lt;tt class="docutils literal"&gt;(133 + 108) / 2&amp;nbsp; =&amp;nbsp; 120.5&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;So why does high case come out high and the low case come out low?  So
there is even more magic.  Graphserver reports an average by take the
mean of all the pages but discarding the high result: &lt;a class="reference external" href="http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l208"&gt;http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l208&lt;/a&gt;
(from
&lt;a class="reference external" href="http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l265"&gt;http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l265&lt;/a&gt;
from &lt;a class="reference external" href="http://hg.mozilla.org/graphs/file/d93235e751c1/server/collect.cgi"&gt;http://hg.mozilla.org/graphs/file/d93235e751c1/server/collect.cgi&lt;/a&gt;
). Since both of the runs exhibit the high value of the bifurcation in
the high case, you report the lower of the two bifurcated values: 589,
from &lt;tt class="docutils literal"&gt;&lt;span class="pre"&gt;big-optimizable-group-opacity-2500.svg&lt;/span&gt;&lt;/tt&gt;. Since in the low case
only one of the values is bifurcated, you get the low value: 120.5,
from small-group-opacity-2500.svg .&lt;/p&gt;
&lt;p&gt;Okay mystery solved.  We know why graphserver is reporting what data
it is reporting and we also know that our algorithm is doing what we
think it is doing.  However, this is the beginning instead of the end
of the problem.&lt;/p&gt;
&lt;p&gt;By taking the average and discarding the high value &lt;em&gt;of two data
points&lt;/em&gt;, we are doing something weird and wrong.  We are effectively
only reporting one of the two pages.  Note for the high and the low
case what we are actually viewing data from the different pages!  This
is misleading and probably outright wrong. We essentially have two
pages just to throw one of them away and then we have no confidence at
what we are looking at.  I'm not sure if the code at
&lt;a class="reference external" href="http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l208"&gt;http://hg.mozilla.org/graphs/file/d93235e751c1/server/pyfomatic/collect.py#l208&lt;/a&gt;
would even work for a single page.  Probably not. In general I grow
increasingly skeptical of our amalgamation of results.  We need
increasingly to be able to get to and manipulate the raw data.  We
certainly need a way of digging into the stats and know what we're
looking at and have confidence in it.  In general, talos, pageloader,
and graphserver need to be made such that it is both easier to try new
filters as well as more transparent to what is actually happening.&lt;/p&gt;
&lt;p&gt;We have been trying to bias towards the low numbers.  Looking at the data for
the four tests show that there are 13 low-state numbers and 7 high-state
numbers. While there are more numbers in the low state, it is not an
overwhelming majority.&lt;/p&gt;
&lt;p&gt;This leaves the big elephant in the room: why are these runs
bifurcated?  Are we seeing a code path, or is something else happening
on these builders that leads to bifurcated results?  While this will
be challenging to investigate, IMHO we should know why this happens.
While our method of throwing out the highest data point, getting the
median, throwing the data to graphserver, then getting the average of
the whole pageset back, has a positive effect of minimizing noise
(which is important), it is also sweeping a lot under the rug.  We
need to have confidence that what we're ignoring is okay to ignore.  I
don't have that confidence yet.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120131164249</guid><pubDate>Tue, 31 Jan 2012 16:42:49 GMT</pubDate></item><item><title>Mozilla Automation and Testing - Jetpack Performance Testing</title><link>http://k0s.org/mozilla/blog/20120124131058</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Mozilla Automation and Testing - Jetpack Performance Testing&lt;/p&gt;
&lt;p&gt;I have a working proof of concept for
Jetpack
performance testing
(&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/JetPerf"&gt;JetPerf&lt;/a&gt;):
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/jetperf"&gt;http://k0s.org/mozilla/hg/jetperf&lt;/a&gt; .
&lt;tt class="docutils literal"&gt;JetPerf&lt;/tt&gt; uses
&lt;a class="reference external" href="http://hg.mozilla.org/build/mozharness"&gt;mozharness&lt;/a&gt;
to run
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos#ts"&gt;Talos ts&lt;/a&gt;
tests with an addon built with the
&lt;a class="reference external" href="https://wiki.mozilla.org/Jetpack"&gt;Jetpack&lt;/a&gt;
&lt;a class="reference external" href="https://addons.mozilla.org/en-US/developers/docs/sdk/latest/"&gt;addon-sdk&lt;/a&gt;
to measure differences betwen performance with and without the addon
installed.&lt;/p&gt;
&lt;p&gt;Playing with Jetpack + Talos performance lets us explore statistics in
a bit more straight-forward manner than the production Talos numbers.
As part of the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/Signal_From_Noise"&gt;Signal from Noise&lt;/a&gt;
project which I am also part of, there is a lot of parts to staging
even small changes in how we process Talos data since the system
involved has many moving parts
(
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt;,
&lt;a class="reference external" href="http://hg.mozilla.org/build/pageloader/"&gt;pageloader&lt;/a&gt;,
&lt;a class="reference external" href="https://wiki.mozilla.org/Perfomatic"&gt;graphserver&lt;/a&gt;
).  By contrast, since JetPerf is a new project, it is much more
flexible to explore the data that we have not hitherto explored.&lt;/p&gt;
&lt;p&gt;I made a
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/jetperf/file/tip/jetperf/jetperf.py"&gt;mozharness script&lt;/a&gt;
to clone the
&lt;a class="reference external" href="'http://hg.mozilla.org/projects/addon-sdk"&gt;hg mirror of addon-sdk&lt;/a&gt; .
It then builds a
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/jetperf/file/82dde6cc262f/jetperf/jetperf.py#l112"&gt;sample addon&lt;/a&gt;
and runs Talos with it installed.&lt;/p&gt;
&lt;p&gt;Looking at raw numbers wasn't very interesting, so I made a
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/jetperf/file/tip/jetperf/compare.py"&gt;parser&lt;/a&gt;
for Talos's
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos/DataFormat"&gt;data format&lt;/a&gt;
It was pretty quick to get some
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=717036#c9"&gt;averages&lt;/a&gt;
out before and after the addon was installed, but I thought it would
be more usefulto display the raw data along with the averages.&lt;/p&gt;
&lt;img alt="https://bug717036.bugzilla.mozilla.org/attachment.cgi?id=591224" src="https://bug717036.bugzilla.mozilla.org/attachment.cgi?id=591224" /&gt;
&lt;p&gt;These really aren't fair numbers, as currently the stub jetpack I use
prints to a file, but its at least a start of a methodology.&lt;/p&gt;
&lt;p&gt;The reason I'm sharing this isn't just to make a progress report, but
more to present some ideas about thinking about what to do with Talos data.
While this was done for JetPerf, much of this also applies to Signal
from Noise.  You run Talos and get some results.  What do you do with
them?  Currently we just shove them into &lt;a class="reference external" href="http://graphs.mozilla.org/"&gt;http://graphs.mozilla.org/&lt;/a&gt;
and say that's where you process them, but I think looking at them
locally is not only important but necessary if you're doing
development work.  I think a big part of any statistics-heavy projects
is to make it easy for &lt;em&gt;all&lt;/em&gt; of the stakeholders to explore data,
apply different filters and see how things fit together.  While it
takes a statistician to be rigorous about the process, anyone can play
with statistics and it takes a village to really conceptualize what is
being looked at.  I hope, to this end, developers will use my software
so that they can understand what it is doing and provide the valuable
feedback I need.&lt;/p&gt;
&lt;div class="section" id="todo"&gt;
&lt;h1&gt;TODO&lt;/h1&gt;
&lt;p&gt;JetPerf is still very much at a proof of concept stage.  Ignoring the
fact that none of it is in production, there are still many
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=717036"&gt;outstanding questions&lt;/a&gt;
about basic facts of what we are doing here.  But outside of polishing
rough edges, here are some things on the pipe.&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;test more variation of addons; currently we just load &lt;tt class="docutils literal"&gt;panel&lt;/tt&gt; and
print something to a file&lt;/li&gt;
&lt;li&gt;test on checkin (&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Continuous_integration"&gt;CI&lt;/a&gt;):
so the main point of JetPerf is to get a better idea of what SDK
changes cause addon performance regressions and hits, to be able to
quantify them.  While as stated this is a very open ended project,
one thing to turn this from a casual exploration to a developer
tool is running the tests on checkin.  This will give an update in
real time of if a checkin breaks performance.&lt;/li&gt;
&lt;li&gt;graphserver: in order to assess Jetpack's performance over time, we
will want to send numbers to some sort of
&lt;a class="reference external" href="http://graphs.mozilla.org/"&gt;graphserver&lt;/a&gt; .
This will allow us to keep track of the data,
to view it, and apply various operations to it.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;I may also spin off the (ad hoc) graphing portion and the Talos log parser
portions into their own modules, as they may be useful outside of just
Jetperf.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120124131058</guid><pubDate>Tue, 24 Jan 2012 13:10:58 GMT</pubDate></item><item><title>Mozilla Automation + Testing - MozBase Continuous Integration</title><link>http://k0s.org/mozilla/blog/20120101165149</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Mozilla Automation + Testing - MozBase Continuous Integration&lt;/p&gt;
&lt;p&gt;As part of the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools"&gt;A-Team&lt;/a&gt;
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Goals/2011Q4#Mozbase"&gt;2011 Q4 goals&lt;/a&gt;
I was able to devote a few days to setting up
continuous integration (CI) for
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/MozBase"&gt;MozBase&lt;/a&gt; .
I revived and extended
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/autobot"&gt;autobot&lt;/a&gt; to support
&lt;a class="reference external" href="http://trac.buildbot.net/"&gt;buildbot&lt;/a&gt; 0.8.5, set up
&lt;a class="reference external" href="https://github.com/mozilla/mozbase/blob/master/test-manifest.ini"&gt;tests&lt;/a&gt;
and a simple
&lt;a class="reference external" href="https://github.com/mozilla/mozbase/blob/master/test.py"&gt;test runner&lt;/a&gt;
for mozbase, and deployed a test instance to &lt;tt class="docutils literal"&gt;k0s.org&lt;/tt&gt;.  You can see
the waterfall here: &lt;a class="reference external" href="http://k0s.org:8010"&gt;http://k0s.org:8010&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While buildbot comes with a
&lt;a class="reference external" href="https://github.com/buildbot/buildbot/blob/master/master/buildbot/changes/gitpoller.py"&gt;gitpoller&lt;/a&gt;
the version in
&lt;a class="reference external" href="http://pypi.python.org/pypi/buildbot/0.8.5"&gt;buildbot 0.8.5&lt;/a&gt;
(the current in &lt;a class="reference external" href="http://pypi.python.org/"&gt;http://pypi.python.org/&lt;/a&gt; ) did not work with
git 1.6.3, the version on &lt;tt class="docutils literal"&gt;k0s.org&lt;/tt&gt;.  Since my box is on an ancient
version of Ubuntu (and is remote and not trivially upgradable), I
brought the generic
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/autobot/file/tip/autobot/changes/poller.py"&gt;autobot poller&lt;/a&gt;
from being buildbot 0.8.3 compatible to 0.8.5 compatible
(which is worth noting is not trivial).
Also, while there has been
&lt;a class="reference external" href="http://trac.buildbot.net/ticket/76"&gt;a patch for an hgpoller&lt;/a&gt;
submitted by
&lt;a class="reference external" href="http://www.mozilla.org/"&gt;Mozilla&lt;/a&gt;
developers some four years ago, it has been be &lt;tt class="docutils literal"&gt;WONTFIX&lt;/tt&gt; ed, so I
went ahead with a generic polling architecture which (IMHO) seems a
wiser architectural choice.  While I sympathize with the architectural
ideology of using a push-based architecture, and believe this is
closer to ideal, polling will always work and does not require access
to the repository servers which is a huge factor when using
&lt;a class="reference external" href="https://github.com"&gt;https://github.com&lt;/a&gt; or even Mozilla &lt;tt class="docutils literal"&gt;hg&lt;/tt&gt; repositories. (Incidentally,
I found neither this patch nor
&lt;a class="reference external" href="http://hg.mozilla.org/build/buildbotcustom/file/tip/changes/hgpoller.py"&gt;http://hg.mozilla.org/build/buildbotcustom/file/tip/changes/hgpoller.py&lt;/a&gt;
to work OOTB, so, sadly, I proceeded to roll my own.  Also
incidentally, it is not trivial to depend on &lt;tt class="docutils literal"&gt;buildbotcustom&lt;/tt&gt; using
&lt;tt class="docutils literal"&gt;install_requires&lt;/tt&gt; due to its lack of a &lt;tt class="docutils literal"&gt;setup.py&lt;/tt&gt; file.)
After debugging the &lt;tt class="docutils literal"&gt;gitpoller&lt;/tt&gt; I pushed
&lt;a class="reference external" href="http://k0s.org:8010/changes/1"&gt;a test change&lt;/a&gt; and was happy to see
that autobot built correctly. Autobot now listens to MozBase changes!&lt;/p&gt;
&lt;p&gt;I was unable to finish the (parenthetical)
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Goals/2011Q4#Mozbase"&gt;Q4 goal&lt;/a&gt;
of having autobot report to
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/Autolog"&gt;autolog&lt;/a&gt; , so
this remains outstanding work.  There is a lot that could be done with
autolog.  The basic idea and TODOs are outlined in the
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/autobot/file/tip/README.txt"&gt;README&lt;/a&gt;
(which itself could use some work; it is largely up to date
except the &lt;em&gt;Projects&lt;/em&gt; section, though incomplete).  I will endeavor to
work on this in my available time or as need escalates, but my
priority for
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Goals/2012Q1#GOAL:_Complete_Phase_I_of_Talos_Signal_From_Noise"&gt;2012 Q1&lt;/a&gt;
will be separating
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/Signal_From_Noise"&gt;Talos Signal From Noise&lt;/a&gt;
so it is unlikely I will be able to put a lot of time into autobot
(sadly).  On the other hand, I am more than willing to help
and advise if anyone
wants any features or to iron out the crinkles.  While the
architecture is not completely straight forward, it is a decent
approximation to a
&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Convex_hull"&gt;convex hull&lt;/a&gt;
over the
&lt;a class="reference external" href="http://en.wikipedia.org/wiki/Problem_domain"&gt;problem space&lt;/a&gt;
of having simple to write, simple to maintain, simple to debug
continuous integration for small(er) projects.  As usual, if anyone
wanted to seek out alternate solutions, that is fine too, but I am
essentially happy with my architecture decisions and technology
choices.&lt;/p&gt;
&lt;p&gt;Regardless of whether the CI solution for MozBase is autobot or
(other), it is important to remember that continuous integration is a
safety net and not a first line of defense.  It is regrettable that
autobot has no more notifications (yet) than the
&lt;a class="reference external" href="http://k0s.org:8010/waterfall"&gt;waterfall display&lt;/a&gt;
and the &lt;tt class="docutils literal"&gt;autobot&lt;/tt&gt; character lurking in
&lt;a class="reference external" href="irc://irc.mozilla.org/#ateam"&gt;#ateam&lt;/a&gt; (the default
&lt;a class="reference external" href="http://buildbot.net/buildbot/docs/0.8.5/manual/cfg-statustargets.html#irc-bot"&gt;IRC bot&lt;/a&gt;
isn't very verbal OOTB and I haven't had time to customize
it).  But I think having some (admittedly smokescreen) automated testing
for MozBase is an important step towards the evolution of the software
as well as towards development practices in general.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20120101165149</guid><pubDate>Sun, 01 Jan 2012 16:51:49 GMT</pubDate></item><item><title>Auto-tools Q4 in reflection: progress on mozbase and talos</title><link>http://k0s.org/mozilla/blog/20111228121840</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Auto-tools Q4 in reflection: progress on mozbase and talos&lt;/p&gt;
&lt;p&gt;Most of my effort this quarter was spend on two related goals:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;developing a sane set of python packages to build test harnesses
on top of.  We call this MozBase: &lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/MozBase"&gt;https://wiki.mozilla.org/Auto-tools/Projects/MozBase&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Making &lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt; sane and
porting it to use the MozBase set of packages.&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;These are illustrated in our goals page:
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Goals/2011Q4#Mozbase"&gt;https://wiki.mozilla.org/Auto-tools/Goals/2011Q4#Mozbase&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From one point of view, this isn't exciting work.  But I live for this
stuff.  I think of software as an ecosystem to be cultivated and I
live to cultivate it.  So while, for the most part, I can't point to
any exciting features that I implemented (nor were there planned to
be), in retrospect I am proud of the fruits of my efforts and those of
my team-mates and comrades.  A big shout out to BYK and others who
have stepped up to the plate to help the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools"&gt;A-Team&lt;/a&gt; with these
super-important efforts.&lt;/p&gt;
&lt;p&gt;When I look back I see:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;Talos wasn't a python package.  Now it is!&lt;/li&gt;
&lt;li&gt;MozBase didn't even exist or have a repo.  Now &lt;a class="reference external" href="https://github.com/mozilla/mozbase"&gt;it does&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;MozBase didn't have documentation or tests worth speaking of.  Now
it has at least a good start!&lt;/li&gt;
&lt;li&gt;Talos even has a &lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=709881"&gt;test&lt;/a&gt; for installation. We need more tests, but its a good start!&lt;/li&gt;
&lt;li&gt;There has been a lot of cleanup of Talos towards the end of making it more robust, easier to use, and easier to contribute to.&lt;/li&gt;
&lt;li&gt;The A-Team didn't have any community contributors.  Now we do!
This one actually makes me the happiest :)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;When I look the progress, I see Talos evolving towards what I would
call real software (instead of a one-off that has been extended to do
way too much to make it a one-off) that Mozillians can hack on and
extend and make useful changes to.  This also sets the stage for
making Talos easier for developers to use locally to test their
changes as well as getting more of our test harnesses to use the
MozBase suite of utilities as well as making it easier to write new
harnesses without reinventing so much of the wheel.&lt;/p&gt;
&lt;p&gt;One of our our next priorities towards these ends is
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=713055"&gt;Bug 713055 - get Talos on Mozharness in production&lt;/a&gt;
This is a huge step towards making buildbot more extensible as well as
having desktop talos be more accessible to developers in a way that
should be identical to the way that it is done in automation.
&lt;a class="reference external" href="http://escapewindow.com/"&gt;:aki&lt;/a&gt; has done a bunch of work to start
moving our aging buildbot infrastructure towards something more sane.
This is &lt;a class="reference external" href="http://escapewindow.com/mozharness/"&gt;mozharness&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;&lt;a class="reference external" href="http://armenzg.blogspot.com/"&gt;Armen (:armenzg)&lt;/a&gt; also updated the
way that &lt;tt class="docutils literal"&gt;talos.zip&lt;/tt&gt; is sought so that it can be decoupled from
buildbot. This is another big step forward that he details in his blog post:
&lt;a class="reference external" href="http://armenzg.blogspot.com/2011/12/taloszip-talosjson-and-you.html"&gt;talos.zip, talos.json and you&lt;/a&gt; .&lt;/p&gt;
&lt;p&gt;So a huge shout out to
&lt;a class="reference external" href="http://elvis314.wordpress.com/"&gt;:jmaher&lt;/a&gt; and
&lt;a class="reference external" href="http://masalalabs.ca/"&gt;:wlach&lt;/a&gt; for all the Talos help, and
&lt;a class="reference external" href="http://ahal.ca/"&gt;:ahal&lt;/a&gt;
and &lt;a class="reference external" href="http://cmtalbert.wordpress.com/"&gt;:ctalbert&lt;/a&gt;
as well as all the help from those in
&lt;a class="reference external" href="https://wiki.mozilla.org/ReleaseEngineering"&gt;release engineering&lt;/a&gt;
for making all of this possible. I look forward to getting this all
better in the coming year.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20111228121840</guid><pubDate>Wed, 28 Dec 2011 12:18:40 GMT</pubDate></item><item><title>The state of Talos this week:</title><link>http://k0s.org/mozilla/blog/20111205200643</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;The state of Talos this week:&lt;/p&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;we need to fix Talos importing of mozbase.  We want to get Talos to consume
mozdevice, mozinfo, mozhttpd, and mozrunner, mozprocess, mozprofile&lt;/li&gt;
&lt;li&gt;The current state of things:
- talos includes the files of mozdevice and mozhttpd.py
- we mirror these manually but things get out of sync&lt;/li&gt;
&lt;li&gt;An interim solution is posed in bug 707218: mirror mozdevice,
mozinfo, and mozhttpd to talos for the purpose of creating a
tests.zip file and list them in setup.py for setuptools
installation.  This works because these are all simple dependencies,
but will not work for mozprocess, mozrunner, and mozprofile as these
all have dependencies of their own&lt;/li&gt;
&lt;li&gt;In order to use these dependencies (mozprocess, mozrunner,
mozprofile) in production talos, we will need a releng python
package index: Bug 701506 . I will do a mock-up there; whether it
will fulfill releng needs or not is hard to say.  We will probably
want to transition to mozharness soon thereafter or at the same
time, but we shouldn't block on any more than we need to. These are
all big changes to our deployment strategy, and for purposes of QA
we will want to make as strategic and specific decisions as possible.&lt;/li&gt;
&lt;li&gt;Once the transition is completely done, we can do away with
talos.zip entirely.&lt;/li&gt;
&lt;li&gt;Additionally, in order to make talos work with &lt;cite&gt;setup.py&lt;/cite&gt;, the
pywin32 package should be listed.  However, pywin32 is in general
compiled for specific python and windows versions.  See e.g.
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=673132#c8"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=673132#c8&lt;/a&gt; . BYK is
looking into this, possibly switching the linked dependency based on
the platform you are on.&lt;/li&gt;
&lt;li&gt;slewchuk is looking into Talos data aggregation: bug 707486&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is a rough map of what we want to do.  As said, with so many
balls in the air, we will want to block on as little as possible and
make as few really big changes at a time so that we can ensure that
each piece of the puzzle fits together correctly.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20111205200643</guid><pubDate>Mon, 05 Dec 2011 20:06:43 GMT</pubDate></item><item><title>I've been developing `Talos &lt;https://wiki.mozilla.org/Buildbot/Talos&gt;`_ ...</title><link>http://k0s.org/mozilla/blog/20111121104230</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;I've been developing
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt;
recently.  There are many caveats working on this test harness that
demands a more rigorous process than, say, a webapp.  It has a large
amount of necessary platform-specific code. It is deployed in a
complex &lt;a class="reference external" href="http://k0s.org/mozilla/workflow.svg"&gt;infrastructure&lt;/a&gt;
environment. And it has no
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=703014"&gt;tests&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In order to test Talos, the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools"&gt;A*Team&lt;/a&gt;
has an internal staging environment (thanks to the efforts of
&lt;a class="reference external" href="http://alice.nodelman.net/blog/"&gt;anode&lt;/a&gt; and
&lt;a class="reference external" href="http://blog.mozilla.com/bhearsum/"&gt;bhearsum&lt;/a&gt; and others)
that mirrors the production testing infrastructure environment.  Like
production, it requires an HTTP-hosted URL structure containing
&lt;a class="reference external" href="http://hg.mozilla.org/build/pageloader"&gt;pageloader&lt;/a&gt; , a pageset
(&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos#tp5"&gt;tp5&lt;/a&gt; ), and other
resources necessary for
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot"&gt;buildbot&lt;/a&gt;
plus Talos.  (We should probably document the directory structure.)&lt;/p&gt;
&lt;p&gt;In order to test Talos, you point the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/staging"&gt;A*Team staging environment&lt;/a&gt;
configuration to your HTTP-hosted location of your copy of
this structure of resources. Then you issue a buildbot sendchange
(which can be scripted for ease of use) that corresponds to a set of
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos#Talos_Tests"&gt;Talos tests&lt;/a&gt;
that are run on each platform of interest.
We have some simple scripts to run tests (i.e. &lt;tt class="docutils literal"&gt;./chrome.sh&lt;/tt&gt; or
&lt;tt class="docutils literal"&gt;./dirty.sh&lt;/tt&gt;) to run sets of tests as we do in production.
This translates to a variety of buildbot sendchange commands
appropriate for the tests to be run. Green runs means good.&lt;/p&gt;
&lt;p&gt;In order to test my Talos changes, I needed to setup a system whereby
I could translate my changes into a hosted copy of talos, pageloader,
etc.  So here is what I did.&lt;/p&gt;
&lt;p&gt;Steps:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="arabic"&gt;
&lt;li&gt;&lt;p class="first"&gt;Replicate &lt;a class="reference external" href="http://people.mozilla.org/~jmaher/taloszips/tip/"&gt;http://people.mozilla.org/~jmaher/taloszips/tip/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;It would be nice to provide a sane base template for this.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Put the talos zips on a web server:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
cd mozilla/web/talos # change to a desired hosted directory
wget -r -l0 --no-parent http://people.mozilla.org/~jmaher/taloszips/tip/
mv people.mozilla.org/~jmaher/taloszips/tip # the piece you need
rm -rf people.mozilla.org # cleanup unneeded directories
find tip -iname 'index.html*' -delete # remove unneeded index pages
&lt;/pre&gt;
&lt;p&gt;[Example: &lt;a class="reference external" href="http://k0s.org/mozilla/talos/tip/"&gt;http://k0s.org/mozilla/talos/tip/&lt;/a&gt;]&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Clone a copy of Talos:&lt;/p&gt;
&lt;pre class="literal-block"&gt;
cd ~/mozilla/src/
virtualenv.py talos-staging
cd talos-staging; mkdir src; cd src
hg clone http://k0s.org/mozilla/hg/talos
echo 'default-push = ssh://k0s.org/mozilla/hg/talos' &amp;gt;&amp;gt; talos/.hg/hgrc
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class="first"&gt;Development process:&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;Based on
&lt;a class="reference external" href="http://elvis314.wordpress.com/"&gt;jmaher's&lt;/a&gt; &lt;tt class="docutils literal"&gt;update_talos.sh&lt;/tt&gt;, I
wrote a script to help me turn changes into changes in my hosted copy
of &lt;tt class="docutils literal"&gt;talos.zip&lt;/tt&gt;.  Since I work largely in diffs hosted on
&lt;a class="reference external" href="https://bugzilla.mozilla.org/"&gt;bugzilla&lt;/a&gt; or
&lt;a class="reference external" href="http://k0s.org/mozilla/hg/talos-patches/"&gt;my mercurial queue&lt;/a&gt;
of Talos patches, I wanted a script that would apply a series of
changes to a checkout of
&lt;a class="reference external" href="http://hg.mozilla.org/build/talos"&gt;talos&lt;/a&gt; .
In addition, I wanted to keep the flexibility of being able to edit
these files on disk.&lt;/p&gt;
&lt;p&gt;The script lives at &lt;a class="reference external" href="http://k0s.org/mozilla/update_talos.py"&gt;http://k0s.org/mozilla/update_talos.py&lt;/a&gt; . I will
endeavor to improve it as testing needs become more apparent.  It
sadly loses
&lt;a class="reference external" href="http://elvis314.wordpress.com/"&gt;jmaher's&lt;/a&gt; &lt;tt class="docutils literal"&gt;update_talos.sh&lt;/tt&gt;
feature to create versioned zips. I thought about hosting a dedicated
talos repository for testing (and still may, if that seems better down
the line), but usually want to test a specific change and rollback to
a known state.&lt;/p&gt;
&lt;p&gt;The script does the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ol class="arabic simple"&gt;
&lt;li&gt;Cleans up and reclones, optionally&lt;/li&gt;
&lt;li&gt;Applies a series of diffs&lt;/li&gt;
&lt;li&gt;Creates a &lt;tt class="docutils literal"&gt;talos.zip&lt;/tt&gt; and moves to the appropriate place on disc.&lt;/li&gt;
&lt;li&gt;Fetches a fresh copy of &lt;a class="reference external" href="http://hg.mozilla.org/build/pageloader/archive/tip.zip"&gt;pageloader.xpi&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Syncs the files with the HTTP server&lt;/li&gt;
&lt;li&gt;Cleans up and reclones, optionally&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;
&lt;p&gt;After the HTTP copy is updated, I can run (e.g.) &lt;tt class="docutils literal"&gt;xperf.sh&lt;/tt&gt; to
trigger that set of tests in the staging environment and watch the
waterfall to assess the viability of the change&lt;/p&gt;
&lt;p&gt;It would be nice to have something more generic, but the path to good
software is through iteration.  Perhaps as more people develop their
own scripts to test Talos in the staging environment we will evolve to
a more generic script to update talos as well as copies or templates
of the URL/directory structure of what as needed as well as the
staging software.&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20111121104230</guid><pubDate>Mon, 21 Nov 2011 10:42:30 GMT</pubDate></item><item><title>Introducing MozBase</title><link>http://k0s.org/mozilla/blog/20111115105922</link><description>&lt;div class="blog-body"&gt;&lt;p&gt;Introducing MozBase&lt;/p&gt;
&lt;p&gt;Over the years, Mozilla has developed a number of
&lt;a class="reference external" href="https://developer.mozilla.org/en/Mozilla_automated_testing"&gt;test harnesses&lt;/a&gt;
for automated testing of Firefox and other applications. Most of the
harness code is written in
&lt;a class="reference external" href="http://python.org/"&gt;python&lt;/a&gt; due to its utility towards this
type of development. As one would expect, the harnesses arose from
necessity and grew organically.  However, as the harnesses grew it
became apparent that there were several generic tasks that the
harnesses shared:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;creating and manipulating a profile&lt;/li&gt;
&lt;li&gt;installing addons into the profile&lt;/li&gt;
&lt;li&gt;invoking (e.g.) Firefox in a desired manner&lt;/li&gt;
&lt;li&gt;process management&lt;/li&gt;
&lt;li&gt;...a few other things&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;These pieces have largely been developed in a vacuum (in the early
stages) or copy+pasted from other harnesses (in the later stages).
This has lead to duplicated functionality, difficult to maintain
and inconsistent harness software (since fixing things one place means
that they probably need to fix them other places), and a system which
was fully understood by no one after it became of sufficient
complexity.  The harness software could not be reused because it is
tightly coupled to the implementation even when the underlying intent
was generic.&lt;/p&gt;
&lt;p&gt;Meet MozBase!&lt;/p&gt;
&lt;p&gt;As software grows, it should be cultivated such that the effectivity
and its knowledge base are maximized.  Code should be made reusable
and the architecture evolved towards a representation of intent.  This
is the goal of the MozBase effort by the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools"&gt;A-Team&lt;/a&gt; :
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/MozBase"&gt;https://wiki.mozilla.org/Auto-tools/Projects/MozBase&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;we want to make high quality components to build test harnesses&lt;/li&gt;
&lt;li&gt;... and other pieces of software&lt;/li&gt;
&lt;li&gt;... that might be useful on their own&lt;/li&gt;
&lt;li&gt;we want to replace existing code with these pieces&lt;/li&gt;
&lt;li&gt;... but cultivate their knowledge base&lt;/li&gt;
&lt;li&gt;we want to develop canonical and reusable python tools&lt;/li&gt;
&lt;li&gt;... and encourage the community to use them&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Developing
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/MozBase"&gt;MozBase&lt;/a&gt; is
one of the
&lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Goals/2011Q4#Mozbase"&gt;A-Team goals&lt;/a&gt;
this quarter. While cultivating software is an ongoing effort, we're
off to a good start.  We already have several MozBase python packages:&lt;/p&gt;
&lt;blockquote&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/mozprocess"&gt;mozprocess&lt;/a&gt; for reliable mozprocess execution and termination&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/mozprofile"&gt;mozprofile&lt;/a&gt; for creating and manipulating profiles&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/mozinfo"&gt;mozinfo&lt;/a&gt; for determining system information&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/mozrunner"&gt;mozrunner&lt;/a&gt; for invoking Firefox in a harness-friendly way&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/manifestdestiny"&gt;ManifestDestiny&lt;/a&gt; for &lt;a class="reference external" href="https://wiki.mozilla.org/Auto-tools/Projects/ManifestDestiny"&gt;universal test manifests&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="reference external" href="https://github.com/mozilla/mozbase/tree/master/mozhttpd"&gt;mozhttpd&lt;/a&gt; , a webserver for testing purposes&lt;/li&gt;
&lt;li&gt;... others available at the &lt;a class="reference external" href="https://github.com/mozilla/mozbase"&gt;mozbase repository&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;p&gt;Our immediate goals are to cultivate these into high-quality tools
taking lessons from the existing harnesses.  Then, porting the
harnesses to these tools that can be maintained in a unified manner.
Right now, we're working on
&lt;a class="reference external" href="https://wiki.mozilla.org/Buildbot/Talos"&gt;Talos&lt;/a&gt; both because this
is a good proving ground for these tools and because much of its code
can be replaced with MozBase code easily (for some definition of
&amp;quot;easy&amp;quot;).&lt;/p&gt;
&lt;p&gt;While MozBase is about software, it is also about having a sane and
maintainable environment to cultivate software in.  While modular
packages are great, their utility is in how they may be used together
(as well as with other code) instead of in the craft of an individual
package.  So we're tackling these issues too.&lt;/p&gt;
&lt;p&gt;Python importing in Mozilla Central: currently (most) python in
mozilla central is not packaged and we manually
&lt;a class="reference external" href="http://mxr.mozilla.org/mozilla-central/source/config/pythonpath.py"&gt;futz with pythonpath&lt;/a&gt;
and &lt;tt class="docutils literal"&gt;sys.path&lt;/tt&gt; in several inconsistent and hard to maintain ways.
In order to move towards python packages in any reasonable fashion we
need to make importing easy and unified as well as moving towards how
the python world typically does importing.  There is
&lt;a class="reference external" href="https://bugzilla.mozilla.org/show_bug.cgi?id=661908"&gt;bug 661908&lt;/a&gt;
for creating a unified &lt;a class="reference external" href="http://www.virtualenv.org/"&gt;virtualenv&lt;/a&gt; in
the &lt;tt class="docutils literal"&gt;$OBJDIR&lt;/tt&gt;.  Work is likely to start on this or a similar effort
soon (either this quarter or Q1 2012).&lt;/p&gt;
&lt;p&gt;Mirroring software to Mozilla Central: we have hampered ourselves --
rewritten software and avoided fixing bugs -- by not using third-party
python packages for tools that live in mozilla-central.  In addition,
since many of the test harness already
&lt;a class="reference external" href="http://mxr.mozilla.org/mozilla-central/source/testing/"&gt;live in m-c&lt;/a&gt; ,
if we are going to move these to consume mozbase we will need a
strategy to mirror it and other software to the tree.  While nothing
has been definitively decided, preliminary discussion has pointed
towards having a script to fetch resources from a variety of locations
and add them to mozilla-central or elsewhere. We're having a meeting
this week to figure out what we really want to do and go from there.&lt;/p&gt;
&lt;p&gt;Such is the MozBase effort.  I am excited to start moving our code
into a solid maintainable structure, and I hope you are too.  If you
are, please check out our
&lt;a class="reference external" href="https://github.com/mozilla/mozbase"&gt;github project&lt;/a&gt; or sign in to
&lt;tt class="docutils literal"&gt;#ateam#&lt;/tt&gt; and tell us what you think.  We'd love contributors!&lt;/p&gt;
&lt;/div&gt;</description><author>k0s</author><guid isPermaLink="true">http://k0s.org/mozilla/blog/20111115105922</guid><pubDate>Tue, 15 Nov 2011 10:59:22 GMT</pubDate></item></channel></rss>
