-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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: adjust the result of curl * #9104
Conversation
Now the result of curl will be displayed in oneline. It is hard to read and hard to grep. We should better make it pretty.
/run-all-tests |
Codecov Report
@@ Coverage Diff @@
## master #9104 +/- ##
==========================================
+ Coverage 67.14% 67.14% +<.01%
==========================================
Files 372 372
Lines 76974 76974
==========================================
+ Hits 51684 51688 +4
+ Misses 20660 20656 -4
Partials 4630 4630
Continue to review full report at Codecov.
|
/run-unit-test |
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.
LGTM
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.
LGTM
Now the result of curl will be displayed in oneline.
It is hard to read and hard to grep.
We should better make it pretty.
What problem does this PR solve?
Make http response more readable.
What is changed and how it works?
Change the interface of writeData
Side effects
All functions which use writeData to write Http Response WILL BE AFFECTED!!!!
Before
Keyi Xie [5:23 PM] xiekeyi@ubuntu:~$ curl http://127.0.0.1:10080/settings {"host":"0.0.0.0","advertise-address":"","port":4000,"cors":"","store":"mocktikv","path":"/tmp/tidb","socket":"","lease":"45s","run-ddl":true,"split-table":true,"token-limit":1000,"oom-action":"log","mem-quota-query":34359738368,"enable-streaming":false,"txn-local-latches":{"enabled":true,"capacity":2048000},"lower-case-table-names":2,"log":{"level":"info","format":"text","disable-timestamp":false,"file":{"filename":"","log-rotate":true,"max-size":300,"max-days":0,"max-backups":0},"slow-query-file":"","slow-threshold":300,"expensive-threshold":10000,"query-log-max-len":2048},"security":{"skip-grant-table":false,"ssl-ca":"","ssl-cert":"","ssl-key":"","cluster-ssl-ca":"","cluster-ssl-cert":"","cluster-ssl-key":""},"status":{"report-status":true,"status-port":10080,"metrics-addr":"","metrics-interval":15},"performance":{"max-procs":0,"max-memory":0,"tcp-keep-alive":true,"cross-join":true,"stats-lease":"3s","run-auto-analyze":true,"stmt-count-limit":5000,"feedback-probability":0.05,"query-feedback-limit":1024,"pseudo-estimate-ratio":0.8,"force-priority":"NO_PRIORITY"},"prepared-plan-cache":{"enabled":false,"capacity":100,"memory-guard-ratio":0.1},"opentracing":{"enable":false,"sampler":{"type":"const","param":1,"sampling-server-url":"","max-operations":0,"sampling-refresh-interval":0},"reporter":{"queue-size":0,"buffer-flush-interval":0,"log-spans":false,"local-agent-host-port":""},"rpc-metrics":false},"proxy-protocol":{"networks":"","header-timeout":5},"tikv-client":{"grpc-connection-count":16,"grpc-keepalive-time":10,"grpc-keepalive-timeout":3,"commit-timeout":"41s","max-txn-time-use":590,"max-batch-size":128,"overload-threshold":200,"max-batch-wait-time":0,"batch-wait-size":8},"binlog":{"enable":false,"write-timeout":"15s","ignore-error":false,"binlog-socket":""},"compatible-kill-query":false,"plugin":{"dir":"","load":""}}xiekeyi@ubuntu:~$
After