-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
57 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
frontend/node_modules | ||
frontend/dist/**/ | ||
frontend/.parcel-cache | ||
frontend/static/perfetto |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
commit_hash="ee7c549fc204622a00b99f733a998fb8b74f5d6d" | ||
git clone https://github.com/google/perfetto.git perfetto_tmp | ||
|
||
cd perfetto_tmp | ||
git checkout $commit_hash || exit 1 | ||
|
||
function allow_url_in_csp() { | ||
url=$1 | ||
sed -i.bak "1,/^[[:space:]]*'blob:'/s/^\([[:space:]]*\)'blob:'/\1'$(echo "$url" | sed 's/\//\\\//g')',\n\1'blob:'/" ui/src/frontend/index.ts | ||
} | ||
|
||
allow_url_in_csp 'https://perf.rust-lang.org' | ||
allow_url_in_csp 'http://localhost:2346' | ||
|
||
tools/install-build-deps --ui | ||
ui/build | ||
|
||
cd .. | ||
|
||
rm -rf static/perfetto | ||
mkdir -p static/perfetto | ||
mv perfetto_tmp/out/ui/ui/dist/* static/perfetto/ && rm -rf perfetto_tmp |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
import Compare from "./compare/page.vue"; | ||
import {createApp} from "vue"; | ||
import {createApp, ref} from "vue"; | ||
import WithSuspense from "../components/with-suspense.vue"; | ||
import {checkIsEmbeddedPerfettoEnabled} from "../perfetto"; | ||
|
||
const isEmbeddedPerfettoEnabled = ref(null); | ||
(async () => { | ||
isEmbeddedPerfettoEnabled.value = await checkIsEmbeddedPerfettoEnabled(); | ||
})(); | ||
|
||
const app = createApp(WithSuspense, { | ||
component: Compare, | ||
}); | ||
app.provide("isEmbeddedPerfettoEnabled", isEmbeddedPerfettoEnabled); | ||
app.mount("#app"); |
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
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