Visitar URL original
move and clean-up web_benchmarks package to flutter/packages (#232) · flutter/packages@5297d1d · GitHub
Skip to content

Commit 5297d1d

Browse files
authored
move and clean-up web_benchmarks package to flutter/packages (#232)
* move web_benchmarks package to flutter/packages + clean-up
1 parent 15c9d62 commit 5297d1d

30 files changed

Lines changed: 3204 additions & 3 deletions

‎.ci/Dockerfile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Last updated 4/8/2020 (to rebuild the docker image, update this timestamp)
2-
FROM cirrusci/flutter:latest
1+
# Last updated 10/22/2020 (to rebuild the docker image, update this timestamp)
2+
FROM cirrusci/flutter:stable-web
33

44
RUN sudo apt-get update && \
55
sudo apt-get upgrade --yes && \

‎.cirrus.yml‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ task:
1111
activate_script: pub global activate flutter_plugin_tools
1212
matrix:
1313
- name: analyze
14-
script: ./script/incremental_build.sh analyze
14+
script: ./script/incremental_build.sh analyze --custom-analysis=web_benchmarks/testing/test_app
1515
- name: publishable
1616
script: ./script/check_publish.sh
1717
depends_on:
@@ -31,6 +31,16 @@ task:
3131
- ./script/incremental_build.sh java-test # must come after apk build
3232
depends_on:
3333
- analyze
34+
- name: web_benchmarks_test
35+
script:
36+
- ./script/install_chromium.sh
37+
- export CHROME_EXECUTABLE=$(pwd)/.chromium/chrome-linux/chrome
38+
- flutter config --enable-web
39+
- cd packages/web_benchmarks/testing/test_app
40+
- flutter packages get
41+
- cd ../..
42+
- flutter packages get
43+
- dart testing/web_benchmarks_test.dart
3444

3545
task:
3646
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'

‎.gitignore‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ GeneratedPluginRegistrant.java
1717
*instrumentscli*.trace
1818
*.cipd
1919

20+
# Build directories are produced when building using the Flutter CLI.
21+
build
22+
23+
# This file is produced as a back-up when web_benchmarks fails to parse a
24+
# Chrome trace.
25+
chrome-trace.json
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.0.1 - Initial release.
2+
3+
* Provide a benchmark server (host-side) and a benchmark client (browser-side).

‎packages/web_benchmarks/LICENSE‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2019 The Chromium Authors. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the name of Google Inc. nor the names of its
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

‎packages/web_benchmarks/README.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# web_benchmarks
2+
3+
A benchmark harness for Flutter Web apps. Currently only supports running
4+
benchmarks in Chrome.
5+
6+
# Writing a benchmark
7+
8+
An example benchmark can be found in [test/web_benchmark_test.dart][1].
9+
10+
A web benchmark is made of two parts: a client and a server. The client is code
11+
that runs in the browser together with the benchmark code. The server serves the
12+
app's code and assets. Additionally, the server communicates with the browser to
13+
extract the performance traces.
14+
15+
[1]: https://github.com/flutter/packages/blob/master/packages/web_benchmarks/test/web_benchmarks_test.dart

0 commit comments

Comments
 (0)