Skip to content
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

Merged
merged 119 commits into from
Apr 22, 2021
Merged

Merge before public release #5

merged 119 commits into from
Apr 22, 2021

Conversation

eze-kiel
Copy link
Member

Merge develop branch to main before public release

reviews welcomed @devops-works/admins 🙏

@eze-kiel eze-kiel changed the title Develop Merge before public release Apr 22, 2021
Copy link
Contributor

@leucos leucos left a 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
Copy link
Contributor

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/
Copy link
Contributor

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
Copy link
Contributor

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 \
Copy link
Contributor

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 \
Copy link
Contributor

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 {
Copy link
Contributor

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 {
Copy link
Contributor

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:") {
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rawBlocks ?

@eze-kiel eze-kiel merged commit 149e667 into main Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants