GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — adds stats to ocsql by basvanbeek · Pull Request #28 · opencensus-integrations/ocsql

Conversation

@basvanbeek

@basvanbeek basvanbeek commented Jan 14, 2019

Copy link
Copy Markdown
Member

Initial implementation of stats for ocsql.

closes #1

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@basvanbeek
adds stats to ocsql
46b59c6
@basvanbeek

basvanbeek commented Jan 14, 2019

Copy link
Copy Markdown
Member Author

PTAL @odeke-em

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

basvanbeek added 2 commits January 14, 2019 22:24
@basvanbeek
adds stats section to README
69e25c5
@basvanbeek
renamed Sql to SQL in variable names
c5860da
odeke-em
odeke-em approved these changes Jan 16, 2019
View reviewed changes

@odeke-em odeke-em left a comment

Copy link
Copy Markdown
Member

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.

Thank you and nice work @basvanbeek, LGTM with one minor comment.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread observability.go Outdated
startTime := time.Now()

return func(err error) {
timeSpent := float64(time.Since(startTime).Nanoseconds()) / 1e6

@odeke-em odeke-em Jan 15, 2019

Copy link
Copy Markdown
Member

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.

timeSpentMs

which will easily give anyone reading this code the context that these are in milliseconds.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@basvanbeek basvanbeek Jan 17, 2019

Copy link
Copy Markdown
Member Author

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 idea...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread observability.go
}
}

func recordCallStats(ctx context.Context, method string) func(err error) {

@odeke-em odeke-em Jan 16, 2019

Copy link
Copy Markdown
Member

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.

Nice!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
odeke-em
odeke-em reviewed Jan 16, 2019
View reviewed changes
Comment thread dbstats_go1.11.go Outdated
}()

return func() {
close(done)

@odeke-em odeke-em Jan 16, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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.

Actually what we can do is ensure that this ever gets called once otherwise calling this again will cause a panic and some folks might misuse it.

var closeOnce sync.Once

return func() {
    closeOnce.Do(func() {
      close(done)
    })
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@basvanbeek basvanbeek Jan 17, 2019

Copy link
Copy Markdown
Member Author

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.

yep, will do...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@basvanbeek
processed feedback on PR #28
ad37a17
@basvanbeek
basvanbeek merged commit eb3ef1d into master Jan 17, 2019
@basvanbeek
basvanbeek deleted the add-stats branch January 17, 2019 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@odeke-em odeke-em odeke-em approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

metrics

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@basvanbeek @odeke-em
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.