Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wecloud_im_server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hewei
wecloud_im_server
Commits
bf5e57a9
Commit
bf5e57a9
authored
Oct 17, 2022
by
Future
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
内存泄露问题处理
parent
a057f7c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletions
+3
-1
core/src/main/java/com/wecloud/im/controller/SignController.java
+3
-1
No files found.
core/src/main/java/com/wecloud/im/controller/SignController.java
View file @
bf5e57a9
...
@@ -45,9 +45,10 @@ public class SignController extends BaseController {
...
@@ -45,9 +45,10 @@ public class SignController extends BaseController {
public
String
monitor
()
{
public
String
monitor
()
{
int
sessionInfoMapSize
=
ChannelManager
.
SESSION_INFO_MAP
.
size
();
int
sessionInfoMapSize
=
ChannelManager
.
SESSION_INFO_MAP
.
size
();
Long
sizeStr
=
RamUsageEstimator
.
sizeOf
(
ChannelManager
.
SESSION_INFO_MAP
);
Long
sizeStr
=
RamUsageEstimator
.
sizeOf
(
ChannelManager
.
SESSION_INFO_MAP
);
Long
shallowSizeStr
=
RamUsageEstimator
.
shallowSizeOf
(
ChannelManager
.
SESSION_INFO_MAP
);
Long
total
=
0L
;
Long
total
=
0L
;
for
(
ClientInfo
value
:
ChannelManager
.
SESSION_INFO_MAP
.
values
())
{
for
(
ClientInfo
value
:
ChannelManager
.
SESSION_INFO_MAP
.
values
())
{
Long
size
=
RamUsageEstimator
.
sizeOf
(
value
);
Long
size
=
RamUsageEstimator
.
s
hallowS
izeOf
(
value
);
log
.
info
(
"size: {}"
,
size
);
log
.
info
(
"size: {}"
,
size
);
total
+=
size
;
total
+=
size
;
}
}
...
@@ -60,6 +61,7 @@ public class SignController extends BaseController {
...
@@ -60,6 +61,7 @@ public class SignController extends BaseController {
StringBuilder
sb
=
new
StringBuilder
()
StringBuilder
sb
=
new
StringBuilder
()
.
append
(
"sessionInfoMapSize: "
).
append
(
sessionInfoMapSize
).
append
(
"---"
)
.
append
(
"sessionInfoMapSize: "
).
append
(
sessionInfoMapSize
).
append
(
"---"
)
.
append
(
"sizeStr:"
).
append
(
sizeStr
).
append
(
"---"
)
.
append
(
"sizeStr:"
).
append
(
sizeStr
).
append
(
"---"
)
.
append
(
"shallowSizeStr:"
).
append
(
shallowSizeStr
).
append
(
"---"
)
.
append
(
"total:"
).
append
(
total
).
append
(
"---"
)
.
append
(
"total:"
).
append
(
total
).
append
(
"---"
)
.
append
(
"sizeClientId:"
).
append
(
sizeClientId
).
append
(
"---"
)
.
append
(
"sizeClientId:"
).
append
(
sizeClientId
).
append
(
"---"
)
.
append
(
"sizeAppId:"
).
append
(
sizeAppId
).
append
(
"---"
)
.
append
(
"sizeAppId:"
).
append
(
sizeAppId
).
append
(
"---"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment