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

server, statistics: support dump history stats #10291

Merged
merged 16 commits into from May 7, 2019

Conversation

Projects
None yet
5 participants
@XuHuaiyu
Copy link
Contributor

commented Apr 28, 2019

What problem does this PR solve?

support dump history statistics

What is changed and how it works?

Add a new http-api tidb_ip/status_port/stats/dump/time_str to fetch history statistics specified by time_str.

e.g. tidb_ip/status_port/stats/dump/20190428173900 will fetch the statistics in 2019-04-28 17:39:00.

Check List

Tests

  • Integration test
  • Manual test (add detailed scripts or steps below)

Code changes

  • Has exported function/method change

Side effects

N/A

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation

@XuHuaiyu XuHuaiyu requested a review from lamxTyler Apr 28, 2019

@codecov

This comment has been minimized.

Copy link

commented Apr 28, 2019

Codecov Report

Merging #10291 into master will decrease coverage by 0.0145%.
The diff coverage is 69.2307%.

@@               Coverage Diff                @@
##             master     #10291        +/-   ##
================================================
- Coverage   77.3234%   77.3089%   -0.0146%     
================================================
  Files           412        412                
  Lines         85542      85571        +29     
================================================
+ Hits          66144      66154        +10     
- Misses        14383      14391         +8     
- Partials       5015       5026        +11
@XuHuaiyu

This comment has been minimized.

Copy link
Contributor Author

commented Apr 28, 2019

/run-all-tests

@zhouqiang-cl

This comment has been minimized.

Copy link
Member

commented Apr 28, 2019

/rebuild

@qw4990 qw4990 self-requested a review Apr 29, 2019

Show resolved Hide resolved server/statistics_handler.go Outdated

@XuHuaiyu XuHuaiyu requested review from qw4990 and lamxTyler and removed request for qw4990 May 7, 2019

Show resolved Hide resolved docs/tidb_http_api.md
Show resolved Hide resolved server/statistics_handler.go Outdated

@XuHuaiyu XuHuaiyu force-pushed the XuHuaiyu:dup_history_stats branch from 20495fe to 42d045d May 7, 2019

store, ok := s.driver.(*TiDBDriver)
if !ok {
panic("Illegal driver")
h.err = errors.New(fmt.Sprintf("illegal driver, excepted TiDBDriver, but got %T", s.driver))

This comment has been minimized.

Copy link
@zz-jason

zz-jason May 7, 2019

Member

errors.Errorf()

Show resolved Hide resolved server/statistics_handler.go Outdated
Show resolved Hide resolved server/statistics_handler.go Outdated
Show resolved Hide resolved statistics/handle/dump.go
Show resolved Hide resolved statistics/handle/handle.go

@XuHuaiyu XuHuaiyu force-pushed the XuHuaiyu:dup_history_stats branch from ac928d3 to a913b80 May 7, 2019

@zz-jason
Copy link
Member

left a comment

LGTM

@XuHuaiyu

This comment has been minimized.

Copy link
Contributor Author

commented May 7, 2019

/run-all-tests

@lamxTyler
Copy link
Member

left a comment

LGTM

@lamxTyler lamxTyler added status/LGT2 and removed status/LGT1 labels May 7, 2019

@XuHuaiyu XuHuaiyu merged commit 4789904 into pingcap:master May 7, 2019

8 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 69.2307% of diff hit (target 0%)
Details
codecov/project 77.3089% (-0.0146%) compared to 17c3229
Details
idc-jenkins-ci-tidb/build Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/build_check_race Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev Jenkins job succeeded.
Details
idc-jenkins-ci-tidb/check_dev_2 Jenkins job succeeded.
Details
license/cla Contributor License Agreement is signed.
Details

@XuHuaiyu XuHuaiyu deleted the XuHuaiyu:dup_history_stats branch May 7, 2019

benpigchu added a commit to benpigchu/tidb that referenced this pull request May 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.