-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cloud Insights Browser Audits PoC #1400
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { browser } from "k6/browser"; | ||
import { sleep } from "k6"; | ||
|
||
export const options = { | ||
scenarios: { | ||
ui: { | ||
executor: "shared-iterations", | ||
options: { | ||
browser: { | ||
type: "chromium", | ||
}, | ||
}, | ||
}, | ||
}, | ||
thresholds: { | ||
checks: ["rate==1.0"], | ||
}, | ||
}; | ||
|
||
export default async function () { | ||
const page = await browser.newPage(); | ||
console.log("hello, world!"); | ||
|
||
await page.goto("https://grafana.com/"); | ||
|
||
sleep(1); | ||
} |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,7 +3,7 @@ module github.com/grafana/xk6-browser | |||||||||||||||||||||||||||||||||||
go 1.20 | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
require ( | ||||||||||||||||||||||||||||||||||||
github.com/chromedp/cdproto v0.0.0-20221023212508-67ada9507fb2 | ||||||||||||||||||||||||||||||||||||
github.com/chromedp/cdproto v0.0.0-20240709201219-e202069cc16b | ||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to update the Lines 85 to 101 in cd451af
I simply updated to the newest version:
|
||||||||||||||||||||||||||||||||||||
github.com/gorilla/websocket v1.5.1 | ||||||||||||||||||||||||||||||||||||
github.com/grafana/sobek v0.0.0-20240613124309-cb36746e8fee | ||||||||||||||||||||||||||||||||||||
github.com/mailru/easyjson v0.7.7 | ||||||||||||||||||||||||||||||||||||
|
@@ -26,6 +26,7 @@ require ( | |||||||||||||||||||||||||||||||||||
github.com/andybalholm/brotli v1.1.0 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/andybalholm/cascadia v1.3.2 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/cenkalti/backoff/v4 v4.2.1 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/chromedp/chromedp v0.9.5 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/chromedp/sysutil v1.0.0 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/davecgh/go-spew v1.1.1 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/dlclark/regexp2 v1.9.0 // indirect | ||||||||||||||||||||||||||||||||||||
|
@@ -35,6 +36,9 @@ require ( | |||||||||||||||||||||||||||||||||||
github.com/go-logr/logr v1.4.1 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/go-logr/stdr v1.2.2 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect | ||||||||||||||||||||||||||||||||||||
github.com/gobwas/httphead v0.1.0 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/gobwas/pool v0.2.1 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/gobwas/ws v1.4.0 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/google/pprof v0.0.0-20230728192033-2ba5b33183c6 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.0 // indirect | ||||||||||||||||||||||||||||||||||||
github.com/josharian/intern v1.0.0 // indirect | ||||||||||||||||||||||||||||||||||||
|
@@ -58,7 +62,7 @@ require ( | |||||||||||||||||||||||||||||||||||
go.opentelemetry.io/otel/sdk v1.24.0 // indirect | ||||||||||||||||||||||||||||||||||||
go.opentelemetry.io/proto/otlp v1.1.0 // indirect | ||||||||||||||||||||||||||||||||||||
golang.org/x/crypto v0.24.0 // indirect | ||||||||||||||||||||||||||||||||||||
golang.org/x/sys v0.21.0 // indirect | ||||||||||||||||||||||||||||||||||||
golang.org/x/sys v0.22.0 // indirect | ||||||||||||||||||||||||||||||||||||
golang.org/x/text v0.16.0 // indirect | ||||||||||||||||||||||||||||||||||||
golang.org/x/time v0.5.0 // indirect | ||||||||||||||||||||||||||||||||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de // indirect | ||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new
cdproto
version removed the already deprecatedPostData
field onnetwork.Request
. Actually supporting the new protocol format could take some time. Not sure what this is used for and how hard it'd be upgrade at this point 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, updating
cdproto
is fine for this PoC. However, updatingcdproto
has some issues (as seen here) in general. We can do the update in a separate PR before this one so that we can ensure that the browser module is still stable after the update.