TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Testing Firefox more efficiently with machine learning

279 pointsby srirangralmost 5 years ago

10 comments

cmehdyalmost 5 years ago
This is the kind of article I&#x27;d love to read more of, as in more of each bit! It allowed me to discover the very well made docs to contribute to Firefox[0], which feels very welcoming to an enthusiastic non-genius-expert engineer, who happens to have some experience with CI, testing automation, and a couple languages.<p>I assume the overhead of the project (and subsequent tweaks to model, re-training and validation) is sufficiently negligible compared to the measured benefits even if those weren&#x27;t as clear-cut as 70%. I&#x27;m unaware of how much compute is required for the task, but likely less than many compute-years per day :)<p>One thing I did not notice in the approach to the modelization of the problem is any link&#x2F;tag regarding the platform for which the code changes are made, and the programming languages used. There seems to be some evidence that certain languages could lead to more defect fixing commits[1], and I don&#x27;t know if there&#x27;s evidence that some platforms are more prone to bugs (I&#x27;m sure wars of words have been fought over this). But would it make sense to have that sort of information inform the model in a way? I fully understand that I might be out of my depth here.<p>[0] <a href="https:&#x2F;&#x2F;firefox-source-docs.mozilla.org&#x2F;setup&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;firefox-source-docs.mozilla.org&#x2F;setup&#x2F;index.html</a><p>[1] <a href="https:&#x2F;&#x2F;cacm.acm.org&#x2F;magazines&#x2F;2017&#x2F;10&#x2F;221326-a-large-scale-study-of-programming-languages-and-code-quality-in-github&#x2F;fulltext" rel="nofollow">https:&#x2F;&#x2F;cacm.acm.org&#x2F;magazines&#x2F;2017&#x2F;10&#x2F;221326-a-large-scale-...</a>
评论 #23803695 未加载
hohenheimalmost 5 years ago
Fantastic read. My only concern is that there wasn&#x27;t any talk around cost of false positives (selecting a test to run where it is unnecessary) vs false negatives (incorrectly dismissing a relevant test), as those costs in terms of their effect is not symmetrical.<p>The cost of a bug slipping through because a test being skipped will be higher than running an irrelevant test to a commit.
评论 #23807604 未加载
评论 #23805273 未加载
评论 #23803383 未加载
评论 #23805932 未加载
pesentialmost 5 years ago
Similar work done at Facebook: <a href="https:&#x2F;&#x2F;engineering.fb.com&#x2F;developer-tools&#x2F;predictive-test-selection&#x2F;" rel="nofollow">https:&#x2F;&#x2F;engineering.fb.com&#x2F;developer-tools&#x2F;predictive-test-s...</a>
ackbar03almost 5 years ago
I always thought software&#x2F;gui testing would be a great application for ai, although I&#x27;ve never really sat down to think about how it could be done
评论 #23807296 未加载
srinivasupadhyaalmost 5 years ago
similar work at google: <a href="https:&#x2F;&#x2F;www.google.com&#x2F;url?sa=t&amp;source=web&amp;rct=j&amp;url=https:&#x2F;&#x2F;research.google.com&#x2F;pubs&#x2F;archive&#x2F;45861.pdf&amp;ved=2ahUKEwjq-ay_2sXqAhWSzDgGHZ6mB8IQFjAHegQIBhAB&amp;usg=AOvVaw1XsFJdUcbLPk1oFl9HxWtD&amp;cshid=1594488052487" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;url?sa=t&amp;source=web&amp;rct=j&amp;url=https:&#x2F;...</a>
评论 #23804464 未加载
Tarq0nalmost 5 years ago
Interesting. So for training they use features:<p>&gt; In the past, how often did this test fail when the same files were touched?<p>&gt; How far in the directory tree are the source files from the test files?<p>&gt; How often in the VCS history were the source files modified together with the test files?<p>But for prediction all they input is a tuple (TEST, PATCH), and XGboost works fine without the additional features?
评论 #23806989 未加载
sillysaurusxalmost 5 years ago
The most interesting part of this to me was something tangential: they use Redis Queues. Anyone have experience with this? Good or bad impressions?<p>The documentation is tantalizing, but hilariously short: <a href="https:&#x2F;&#x2F;devcenter.heroku.com&#x2F;articles&#x2F;python-rq" rel="nofollow">https:&#x2F;&#x2F;devcenter.heroku.com&#x2F;articles&#x2F;python-rq</a><p>Very &quot;And then draw the rest of the owl.&quot; Oh really, you can just do `from utils import count_words_at_url; q.enqueue(count_words_at_url, &#x27;<a href="http:&#x2F;&#x2F;heroku.com&#x27;)`" rel="nofollow">http:&#x2F;&#x2F;heroku.com&#x27;)`</a> and presto, your blocking function -- whose source code exists locally -- is run successfully at the other end?<p>I&#x27;ll have to set aside some time to try this out. Python <i>does</i> have introspection facilities that could make that possible. I could imagine that since the code is executed on the same box, it&#x27;s relatively simple to send a request like &quot;here&#x27;s which module the function was loaded from; here&#x27;s the order all modules were loaded in; load those modules and call this function.&quot; But it leaves so many questions: serialization, performance, scaling, and all the tiny bugs that inevitably come up.<p>I guess I was hoping someone could give me a quick gut check of positive&#x2F;negative reactions. The full RQ documentation is slightly better: <a href="https:&#x2F;&#x2F;python-rq.org&#x2F;docs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;python-rq.org&#x2F;docs&#x2F;</a> but has some worrying signs:<p><i>Make sure that the function call does not depend on its context. In particular, global variables are evil (as always), but also any state that the function depends on (for example a “current” user or “current” web request) is not there when the worker will process it. If you want work done for the “current” user, you should resolve that user to a concrete instance and pass a reference to that user object to the job as an argument.</i><p>Yes, sure, global variables are the root of satan, but they&#x27;re also a fact of life in many scenarios.<p>Interesting approach... I wonder how much of a nightmare it makes devops...
评论 #23803384 未加载
评论 #23803004 未加载
gorgoileralmost 5 years ago
Stability and speed from Firefox are always welcome. I’d love to see some performance gains on armhf (raspberry pi 4) in particular. It’s good, and close to being blissfully simple.
评论 #23805765 未加载
data_dersalmost 5 years ago
really cool project. nice high-level overview of all the components. However, I still don&#x27;t understand the impact measurement -- how do you measure the impact of this against the baseline? I didn&#x27;t get that part in the effectiveness section. Maybe I&#x27;m too newb -- but you could A&#x2F;B test this, right? 50% of PRs are subjected to automated tooling, 50% manual and compare compute cost and failures b&#x2F;w the two?
评论 #23814923 未加载
Diane09974almost 5 years ago
yesss