Skip to content

Instantly share code, notes, and snippets.

@HalCanary
Created March 13, 2018 01:53
Show Gist options
  • Save HalCanary/d870f9710bf0437f86ebad3d081a082c to your computer and use it in GitHub Desktop.
Save HalCanary/d870f9710bf0437f86ebad3d081a082c to your computer and use it in GitHub Desktop.
#! /bin/sh
# Copyright 2018 Google Inc.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
if [ $# -ne 3 ]; then
echo usage:
echo $0 EXECUTABLE URL DESTINATION_PATH
exit 1
fi
EXE="$1"
URL="$2"
DST="$3"
CRASH=~/tmp/headless_crash_dumps
mkdir -p "$CRASH"
"$EXE" --headless --disable-gpu --repl -crash-dumps-dir="$CRASH" \
--no-sandbox --enable-gpu-benchmarking "$URL" << EOF
chrome.gpuBenchmarking.printPagesToSkPictures("${DST}")
quit
EOF
ls -l "$DST"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment