Skip to content

Update script-servo #676

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

Merged
merged 11 commits into from
Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
64 changes: 62 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ env:
AWS_ACCESS_KEY_ID: AKIA46X5W6CZBLO3VBND

jobs:
ci:
name: CI
test_and_deploy:
name: Test and deploy
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
Expand All @@ -32,3 +32,63 @@ jobs:
aws_access_key_id: "${{ env.AWS_ACCESS_KEY_ID }}"
aws_secret_access_key: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/deploy'
test_benchmarks:
name: Test benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Configure environment
run: |
sudo apt-get update
sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid

- name: Build collector
run: cargo build -p collector

- name: Check benchmarks
run: sh -x -c "ci/check-benchmarks.sh"
env:
COLLECTOR_ARGS: "--exclude script-servo"
test_script_servo:
name: Test benchmark script-servo
runs-on: ubuntu-latest
steps:
- name: Checkout the source code
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true

- name: Configure environment
run: |
sudo apt-get update
sudo apt-get install -y linux-tools-common linux-tools-generic linux-tools-`uname -r`
echo -1 | sudo tee /proc/sys/kernel/perf_event_paranoid

- name: Install servo dependencies
run: sudo apt-get install -y llvm-dev clang libx11-dev python2.7 autoconf2.13

- name: Build collector
run: cargo build -p collector

- name: Check benchmarks
run: sh -x -c "ci/check-benchmarks.sh"
env:
COLLECTOR_ARGS: "--filter script-servo"
SHELL: "/bin/bash"
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions ci/check-benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -x;
bash -c "while true; do sleep 30; echo \$(date) - running ...; done" &
PING_LOOP_PID=$!
trap - ERR
cargo build -p collector;
RUST_BACKTRACE=1 RUST_LOG=collector=trace,rust_sysroot=debug \
RUST_BACKTRACE=1 RUST_LOG=collector=debug,rust_sysroot=debug \
cargo run -p collector --bin collector -- \
--db temporary.db \
--exclude servo,cargo,crates.io,packed-simd,sentry-cli,tuple-stress test_benchmarks;
$COLLECTOR_ARGS \
test_benchmarks;
code=$?
kill $PING_LOOP_PID
exit $code
4 changes: 3 additions & 1 deletion collector/benchmarks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ These are real programs that are important in some way, and worth tracking.
- **piston-image**: A modular game engine. An interesting Rust program.
- **regex**: A regular expression parser. Used by many Rust programs.
- **ripgrep**: A line-oriented search tool. A widely-used utility.
- **script-servo**: Servo's `script` crate. A particularly large crate.
- **script-servo**: Servo's `script` crate. A particularly large crate. At
5ad7e5b4fbd58, with [PR#27063](https://github.com/servo/servo/pull/27063)
applied atop.
- **serde**: A serialization/deserialization crate. Used by many other
Rust programs.
- **style-servo**: Servo's `style` crate. A large crate, and one used by
Expand Down
121 changes: 121 additions & 0 deletions collector/benchmarks/script-servo-2/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
Language: Cpp
BasedOnStyle: Mozilla
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
- Regex: '.*'
Priority: 1
IncludeIsMainRegex: '(Test)?$'
IndentCaseLabels: false
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
ReflowComments: true
SortIncludes: false
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Cpp11
StatementMacros:
- Q_UNUSED
- QT_REQUIRE_VERSION
TabWidth: 8
UseTab: Never
...

6 changes: 6 additions & 0 deletions collector/benchmarks/script-servo-2/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto eol=lf
tests/* linguist-vendored

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
66 changes: 66 additions & 0 deletions collector/benchmarks/script-servo-2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/.servo
/.cargo/*
!/.cargo/config.*
/.servobuild
/.wpt
/.vs
/android-toolchains
/target
/tests/wpt/reftests-report/report.html
/ports/android/bin
/ports/android/libs
/ports/android/local.properties
/ports/android/obj
/python/_virtualenv*
/python/tidy/servo_tidy.egg-info
/tests/wpt/sync
*~
*.pkl
*.pyc
*.swp
*.swo
*.csv
*.rej
*.orig
.coverage
.DS_Store
Servo.app
.config.mk.last
/glfw
capture_webrender/
/screenshots
# Editors

# IntelliJ
.idea
*.iws
*.iml

#Gradle
.gradle

# VSCode
.vscode
!/.vscode/extensions.json

/unminified-js

# Hololens artifacts

support/hololens/x64/
support/hololens/ARM/
support/hololens/ARM64/
support/hololens/ServoApp/x64/
support/hololens/ServoApp/ARM/
support/hololens/ServoApp/ARM64/
support/hololens/ServoApp/Generated Files/
support/hololens/ServoApp/BundleArtifacts/
support/hololens/ServoApp/support/
support/hololens/ServoApp/Debug/
support/hololens/ServoApp/Release/
support/hololens/packages/
support/hololens/AppPackages/
support/hololens/.vs/

# Layout debugger trace files
layout_trace*
30 changes: 30 additions & 0 deletions collector/benchmarks/script-servo-2/.hgignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
^\.servo
^\.cargo
^\.servobuild
^target/
^ports/android/bin
^ports/android/libs
^ports/android/local.properties
^ports/android/obj
^python/_virtualenv
^python/tidy/servo_tidy\.egg-info
~$
\.pkl$
\.pyc$
\.swp$
\.swo$
\.csv$

\.DS_Store$
Servo\.app/
\.config\.mk\.last$
/glfw

# Editors

# IntelliJ
\.idea
\.iws$

# VSCode
\.vscode
Loading