Skip to content
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

add some perf log for unsweetenning process, and output IR to file #447

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

mo-xiaoming
Copy link
Contributor

@mo-xiaoming mo-xiaoming commented Mar 19, 2023

when operating on large variant or record, unsweeten might be slow. Adding some logs when both
- HOBBES_PERF_TRACE_FILE log file path
- HOBBES_PERF_TRACE_THRESHOLD_IN_SECS threshold for unsweetenning on named var

are defined. Logs are in the format of

```
HOBBES_PERF:rexec_data:BEGIN:3:show({a = |A = ()|::|A, B, C|, x = |X = ()|::|X, Y, Z|})
HOBBES_PERF:rexec_data:2:{ a:|A, B, C|, x:|X, Y, Z| }
HOBBES_PERF:rexec_data:3:|X, Y, Z|
HOBBES_PERF:rexec_data:3:|A, B, C|
HOBBES_PERF:rexec_data:END:9
```

```
HOBBES_PERF:rexec_data:BEGIN: 3       :show({a = |A = ()|::|A, B, C|, x = |X = ()|::|X, Y, Z|})
mark           name    mark   duration       expression
```

```
HOBBES_PERF:rexec_data:3                :|X, Y, Z|
mark           name    size_of_variant   variant
```

```
HOBBES_PERF:rexec_data:END   :9
mark           name    mark   new_expressions_generated_by_this_var
```

two environment variables:

  HOBBES_PERF_TRACE_THRESHOLD_IN_SECS: any *named* expression take more
  than this seconds to be unsweetenned, then some related info will be
  logged in file

  HOBBES_PERF_TRACE_FILE: logs will be written to this file
  HOBBES_IR_TRACE_FILE: file that IR will be stored
@mo-xiaoming mo-xiaoming changed the title Hobbes logs add some perf log for unsweetenning process, and output IR to file Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant