-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat(controller): k8s_request_total
and workflow_condition
metrics
#4811
Merged
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
8f31870
poc: Various metrics and performance fixes
alexec f5c3720
:test: D util/unstructured/workflow/phase.go
alexec b0c6a68
:test: M workflow/metrics/metrics_test.go
alexec df410ab
Merge branch 'master' into test
alexec 89852a6
:test: M test/e2e/functional_test.go
alexec 614f187
:test: M Makefile
alexec 3542394
Merge branch 'master' into test
alexec 6e33f57
:test: M cmd/argoexec/commands/root.go
alexec 3961319
Merge branch 'master' into test
alexec ec31c22
:test: M Makefile
alexec a75f82e
:test: M Makefile
alexec 9dc7206
:test: M docs/metrics.md
alexec f76f766
:test: M Makefile
alexec 58de62d
:test: M test/stress/tool/main.go
alexec 42969a5
:test: M test/stress/tool/main.go
alexec 60db56e
:test: M test/stress/tool/main.go
alexec 3886d3f
:test: M test/stress/tool/main.go
alexec 75a118d
Merge branch 'master' into test
alexec 060a79e
:test: M hack/capture-pprof.sh
alexec 56c2c8b
:test: M hack/capture-pprof.sh
alexec File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
|
@@ -34,3 +34,4 @@ git-ask-pass.sh | |
/.brew_home | ||
/go-diagrams/ | ||
/.run/ | ||
pprof | ||
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 |
---|---|---|
|
@@ -3,6 +3,8 @@ package main | |
import ( | ||
"context" | ||
"fmt" | ||
"net/http" | ||
_ "net/http/pprof" | ||
"os" | ||
"time" | ||
|
||
|
@@ -21,6 +23,7 @@ import ( | |
wfclientset "github.com/argoproj/argo/pkg/client/clientset/versioned" | ||
cmdutil "github.com/argoproj/argo/util/cmd" | ||
"github.com/argoproj/argo/workflow/controller" | ||
"github.com/argoproj/argo/workflow/metrics" | ||
) | ||
|
||
const ( | ||
|
@@ -64,6 +67,8 @@ func NewRootCommand() *cobra.Command { | |
config.Burst = burst | ||
config.QPS = qps | ||
|
||
metrics.AddMetricsTransportWrapper(config) | ||
|
||
namespace, _, err := clientConfig.Namespace() | ||
if err != nil { | ||
return err | ||
|
@@ -89,6 +94,10 @@ func NewRootCommand() *cobra.Command { | |
|
||
go wfController.Run(ctx, workflowWorkers, workflowTTLWorkers, podWorkers, podCleanupWorkers) | ||
|
||
go func() { | ||
log.Println(http.ListenAndServe("localhost:6060", nil)) | ||
}() | ||
Comment on lines
+97
to
+99
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. Why the |
||
|
||
// Wait forever | ||
select {} | ||
}, | ||
|
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Stress Testing | ||
|
||
Create a cluster in [`jesse-sb` project](https://console.cloud.google.com/access/iam?cloudshell=false&project=jesse-sb). | ||
|
||
Install `gcloud` binary. | ||
|
||
Login to GCP: `gloud auth login` | ||
|
||
Connect to your new cluster. | ||
|
||
Make sure you've logged in to Docker Hub: `docker login` | ||
|
||
Run `make start PROFILE=stress IMAGE_NAMESPACE=alexcollinsintuit DOCKER_PUSH=true`. | ||
|
||
If this fails, just try running it again. | ||
|
||
Open http://localhost:2746 and check you can run a workflow. | ||
|
||
Open `test/stress/main.go` and run it with a small number (e.g. 10) workflows and make sure they complete. | ||
|
||
Do you get `ImagePullBackOff`? Make sure image is `argoproj/argosay:v2` in `kubectl -n argo edit workflowtemplate massive-workflow`. | ||
|
||
Open http://localhost:9091/graph. | ||
|
||
You can use [this Tab Auto Refresh Chrome extension](https://chrome.google.com/webstore/detail/tab-auto-refresh/oomoeacogjkolheacgdkkkhbjipaomkn) to auto-refresh the page. | ||
|
||
Open `test/stress/main.go` and run it with a large number (e.g. 10000). | ||
|
||
Use Prometheus to analyse this. | ||
|
||
Finally, you can capture PProf using `./hack/capture-pprof.sh`. | ||
|
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,14 @@ | ||
#!/usr/bin/env bash | ||
set -eu -o pipefail | ||
|
||
echo " https://blog.golang.org/pprof" | ||
|
||
cd $(dirname $0)/.. | ||
|
||
n=$(date +%s) | ||
|
||
go tool pprof -png -output dist/heap-$n.png http://localhost:6060/debug/pprof/heap | ||
go tool pprof -png -output dist/allocs-$n.png http://localhost:6060/debug/pprof/allocs | ||
go tool pprof -png -output dist/block-$n.png http://localhost:6060/debug/pprof/block | ||
go tool pprof -png -output dist/mutex-$n.png http://localhost:6060/debug/pprof/mutex | ||
go tool pprof -png -output dist/profile-$n.png http://localhost:6060/debug/pprof/profile?seconds=30 |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
👍