2020-12-22 00:46:27 +00:00
|
|
|
# The following test the online instance, post-deploy. I just kept them here for convenience
|
|
|
|
|
|
|
|
DOMAIN = seirdy.one
|
|
|
|
PAGE_PATH = /
|
|
|
|
SCHEME=https://
|
|
|
|
URL = $(SCHEME)$(DOMAIN)$(PAGE_PATH)
|
|
|
|
# latest bleeding-edge chromium snapshot
|
2021-06-30 06:54:55 +00:00
|
|
|
CHROME_PATH = /home/rkumar/Executables/ghq/github.com/chromium-unofficial-latest-linux/chromium-latest-linux/latest/chrome-linux/chrome
|
2020-12-22 00:46:27 +00:00
|
|
|
CHROME_PROFILE = /tmp/chrome-lighthouse
|
2022-02-19 20:47:07 +00:00
|
|
|
CHROME_FLAGS += --headless --disable-extensions --no-default-browser-check --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-device-discovery-notifications --disable-domain-reliability --disable-background-timer-throttling --disable-breakpad --enable-blink-features=LayoutInstabilityAPI --no-first-run --disable-component-update --disable-background-networking --enable-features='EmbeddingRequiresOptIn,EnableDrDc,HttpsOnlyMode,PdfUnseasoned,StrictOriginIsolation,StrictExtensionIsolation,WebRtcHideLocalIpsWithMdns,ThrottleDisplayNoneAndVisibilityHiddenCrossOriginIframes,UseOzonePlatform' --user-data-dir=$(CHROME_PROFILE) --enable-quic --origin-to-force-quic-on=seirdy.one:443
|
2020-12-22 00:46:27 +00:00
|
|
|
CPU_SLOWDOWN=2.4
|
2022-02-19 20:47:07 +00:00
|
|
|
LIGHTHOUSE_ARGS += --budget-path budget.json --output html --output json --output-file lighthouse-results --throttling.cpuSlowdownMultiplier=$(CPU_SLOWDOWN) --chrome-flags="$(CHROME_FLAGS)"
|
2020-12-22 00:46:27 +00:00
|
|
|
|
|
|
|
hint-online:
|
2022-02-19 20:47:07 +00:00
|
|
|
pnpx hint --config .hintrc -f codeframe $(URL)
|
2020-12-22 00:46:27 +00:00
|
|
|
lighthouse:
|
|
|
|
mkdir -p $(CHROME_PROFILE)
|
2022-02-19 20:47:07 +00:00
|
|
|
CHROME_PATH=$(CHROME_PATH) lighthouse $(URL) $(LIGHTHOUSE_ARGS)
|
2020-12-22 00:46:27 +00:00
|
|
|
rm -rf $(CHROME_PROFILE)
|
2020-12-23 02:11:19 +00:00
|
|
|
redbot:
|
|
|
|
redbot_cli -a $(URL)
|
2020-12-22 00:46:27 +00:00
|
|
|
|
|
|
|
all: lighthouse hint-online
|
|
|
|
|
2020-12-23 02:11:19 +00:00
|
|
|
.PHONY: hint-online lighthouse redbot all
|