forked from mozilla/firefox-translations
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Benchmark #19
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Easy way of making benchmark files that are more realistic in terms of chunking
TranslateLocally benchmarking depends on XapaJIaMnu/translateLocally#103 |
For that scanability!
But the smart one that replaced `then` was not working well with `Promise.any`.
Rework how the rendering stuff in common.js works in the process
We handle this inside the plugin so it can be toggled for benchmarking. Patching it in is fine, but it is skipped over and prints false debug messages.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a benchmarking page to the extension, as an "easy" way to get some numbers. Having the benchmarking page in the extension is not entirely necessary, but since development of upstream stuff is the raison d'être of this thing, might as well maintain it. It does give more finegrained control over performance tuning, so that's cool.
Tested on Firefox Nightly 102, 2019 Macbook 16” 2.3 GHz 8-core (but only 4 used in test) Intel i9, 5 runs per scenario
Test set: recored-pages(2).xml.zip which is me browsing German Wikipedia and Der Spiegel for a bit.
Its hardcoded to de-en and it does not check whether it is using the same models. But it is getting the models from the same TranslateLocally repository, and it has the same heuristic as TranslateLocally: locally is preferred, then tiny is preferred.
In the addon options, you can turn on "developer mode" (or whatever I called it). This then adds a "record translation requests" toggle in the translation popup. When you tick that, it will start recording all translation requests from that point on. You can click the "Export xml" link next to the checkbox to get the recording. This also clears the recorder again.
Then, also in the addon settings, there is a link to the benchmark page. Upload the recording you just downloaded there, and you can run it on multiple scenarios.