-
Notifications
You must be signed in to change notification settings - Fork 8
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
Merge before public release #5
Conversation
changed order of values displayed with ?
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.
Good work !! 🙌
WHITE := $(shell tput -Txterm setaf 7) | ||
RESET := $(shell tput -Txterm sgr0) | ||
|
||
.PHONY: all build clean |
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.
pas de cible build
## Build: | ||
digest: ## Build slowql-digest | ||
$(GOCMD) mod tidy | ||
GO111MODULE=on $(GOCMD) build -o $(BUILD_ROOT)digest ./cmd/slowql-digest/ |
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.
@GO111MODULE ...
pour une sortie plus jolie ?
|
||
.PHONY: all build clean | ||
|
||
all: help |
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.
all: digest replayer
?
@@ -0,0 +1,17 @@ | |||
# Build stage | |||
FROM devopsworks/golang-upx:1.16 AS builder | |||
ENV GO111MODULE=on \ |
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.
GO111MODULE plus necessaire
@@ -0,0 +1,17 @@ | |||
# Build stage | |||
FROM devopsworks/golang-upx:1.15 AS builder | |||
ENV GO111MODULE=on \ |
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.
GO111MODULE plus necessaire
if sleep > 0 { | ||
time.Sleep(sleep) | ||
} | ||
if noDryRun { |
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.
would rather move queries <- 42
here (and add a comment about it), and do a if dryRun { continue }
break | ||
} | ||
|
||
if firstPass { |
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.
same remark as before: make first GetNext call before the loop to get rid of if
?
for idx, part := range parts { | ||
part = strings.ToLower(part) | ||
|
||
if strings.Contains(part, "query_time:") { |
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.
may be more elegant with a s/c ?
switch {
case strings.Contains(part, "query_time:"):
....
case strings.Contains(part, "lock_time:"):
...
}
Your call, matter of taste
// GetNext() Query | ||
// // GetServerMeta returns informations about the SQL server in usage | ||
// GetServerMeta() Server | ||
ParseBlocs(rawBlocs chan []string) |
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.
Blocks ?
type Parser struct { | ||
db Database | ||
waitingList chan query.Query | ||
rawBlocs chan []string |
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.
rawBlocks ?
Merge develop branch to main before public release
reviews welcomed @devops-works/admins 🙏