Skip to content

Commit

Permalink
Prettified Code!
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc authored and actions-user committed Jan 2, 2024
1 parent 7a1f84a commit 2fbb592
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions site/docs/doc/tt.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

## 注意事项

* tt 命令的实现是:把函数的入参/返回值等,保存到一个`Map<Integer, TimeFragment>`里,默认的大小是 100。
* tt 相关功能在使用完之后,需要手动释放内存,否则长时间可能导致OOM。退出 arthas 不会自动清除 tt 的缓存 map。
- tt 命令的实现是:把函数的入参/返回值等,保存到一个`Map<Integer, TimeFragment>`里,默认的大小是 100。
- tt 相关功能在使用完之后,需要手动释放内存,否则长时间可能导致OOM。退出 arthas 不会自动清除 tt 的缓存 map。

## 使用参考

Expand Down Expand Up @@ -244,7 +244,6 @@ Affect(class count: 1 , method count: 1) cost in 56 ms, listenerId: 1

需要强调的是,`tt` 命令是将当前环境的对象引用保存起来,但仅仅也只能保存一个引用而已。如果方法内部对入参进行了变更,或者返回的对象经过了后续的处理,那么在 `tt` 查看的时候将无法看到当时最准确的值。这也是为什么 `watch` 命令存在的意义。


### 通过索引删除指定的 tt 记录

```
Expand All @@ -255,4 +254,4 @@ tt -d 1001

```
tt --delete-all
```
```
6 changes: 3 additions & 3 deletions site/docs/en/doc/tt.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ With the help of `tt` (_TimeTunnel_), you can check the contexts of the methods

## Precautions

* The implementation of the tt command is to save the input parameters/return values of the function into a `Map<Integer, TimeFragment>`. The default size is 100.
* After using tt related functions, you need to manually release the memory, otherwise OOM may occur for a long time. Exiting arthas will not automatically clear tt's cache map.
- The implementation of the tt command is to save the input parameters/return values of the function into a `Map<Integer, TimeFragment>`. The default size is 100.
- After using tt related functions, you need to manually release the memory, otherwise OOM may occur for a long time. Exiting arthas will not automatically clear tt's cache map.

## Usage

Expand Down Expand Up @@ -226,4 +226,4 @@ tt -d 1001

```
tt --delete-all
```
```

0 comments on commit 2fbb592

Please sign in to comment.