You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/04/04 20:02:52 UTC
[GitHub] [couchdb] noahshaw11 opened a new pull request, #3983: Implement print_table/2
noahshaw11 opened a new pull request, #3983:
URL: https://github.com/apache/couchdb/pull/3983
## Overview
Implement `couch_debug:print_table/2` to facilitate memory leak detections.
## Testing recommendations
## Related Issues or Pull Requests
## Checklist
- [ ] Code is written and works correctly
- [ ] Changes are covered by tests
- [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
- [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] iilyak commented on a diff in pull request #3983: Implement print_table/2
Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #3983:
URL: https://github.com/apache/couchdb/pull/3983#discussion_r844159003
##########
src/couch/src/couch_debug.erl:
##########
@@ -273,6 +278,17 @@ couch_index_server[<0.288.0>] | 478240 | 0 |
couch_index:init/1[<0.3520.22>] | 4899 | 0 | 109456
```
+ ---
+ ", []);
+help(print_table) ->
+ io:format("
+ print_table(Rows, TableSpec)
+ --------------------------------
+
+ Print table of specifications.
+ - Rows: List of {Id, Props} to be printed from the TableSpec
+ - TableSpec: List of either {Value} or {Width, Align, Value}.
Review Comment:
left/center/right
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] iilyak commented on a diff in pull request #3983: Implement print_table/2
Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #3983:
URL: https://github.com/apache/couchdb/pull/3983#discussion_r867038740
##########
src/couch/src/couch_debug.erl:
##########
@@ -615,6 +632,16 @@ restart_busy(ProcessList, Threshold, DelayInMsec, Property) when
%% - left
%% - centre
%% - right
+print_table(Rows, TableSpec) ->
+ io:format("~s~n", [format(TableSpec)]),
+ lists:foreach(
+ fun({Id, Props}) ->
+ io:format("~s~n", [table_row(Id, 2, Props, TableSpec)])
+ end,
+ Rows
+ ),
+ ok.
+
print_tree(Tree, TableSpec) ->
Review Comment:
both print_table and print_tree should have comments documenting their arguments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] noahshaw11 commented on a diff in pull request #3983: Implement print_table/2
Posted by GitBox <gi...@apache.org>.
noahshaw11 commented on code in PR #3983:
URL: https://github.com/apache/couchdb/pull/3983#discussion_r867061632
##########
src/couch/src/couch_debug.erl:
##########
@@ -615,6 +632,16 @@ restart_busy(ProcessList, Threshold, DelayInMsec, Property) when
%% - left
%% - centre
%% - right
+print_table(Rows, TableSpec) ->
+ io:format("~s~n", [format(TableSpec)]),
+ lists:foreach(
+ fun({Id, Props}) ->
+ io:format("~s~n", [table_row(Id, 2, Props, TableSpec)])
+ end,
+ Rows
+ ),
+ ok.
+
print_tree(Tree, TableSpec) ->
Review Comment:
Added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] iilyak commented on a diff in pull request #3983: Implement print_table/2
Posted by GitBox <gi...@apache.org>.
iilyak commented on code in PR #3983:
URL: https://github.com/apache/couchdb/pull/3983#discussion_r844158556
##########
src/couch/src/couch_debug.erl:
##########
@@ -273,6 +278,17 @@ couch_index_server[<0.288.0>] | 478240 | 0 |
couch_index:init/1[<0.3520.22>] | 4899 | 0 | 109456
```
+ ---
+ ", []);
+help(print_table) ->
+ io:format("
+ print_table(Rows, TableSpec)
+ --------------------------------
+
+ Print table of specifications.
+ - Rows: List of {Id, Props} to be printed from the TableSpec
+ - TableSpec: List of either {Value} or {Width, Align, Value}.
Review Comment:
Where `Align` is ...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] iilyak merged pull request #3983: Implement print_table/2
Posted by GitBox <gi...@apache.org>.
iilyak merged PR #3983:
URL: https://github.com/apache/couchdb/pull/3983
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org