noahshaw11 commented on PR #3985:
URL: https://github.com/apache/couchdb/pull/3985#issuecomment-1101883696
@iilyak @iilyak The logic between the two functions below is circular and
causes an infinite loop. How should this be implemented?
```
resource_hoggers_data(MemoryInfo, InfoKey, KeyFun) when is_atom(InfoKey) ->
resource_hoggers_data(MemoryInfo, Info, KeyFun, 20).
resource_hoggers_data(MemoryInfo, InfoKey, KeyFun, N) when is_atom(InfoKey)
->
SortedTuples = resource_hoggers_data(MemoryInfo, InfoKey, undefined),
{TopN, _} = lists:split(20, SortedTuples),
TopN.
```
Also, is `MemoryInfo` expected to be the return value of `memory_info`
implemented here: https://github.com/apache/couchdb/pull/3984 ?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]