Skip to content

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

Open
mo-xiaoming wants to merge 8 commits into
morganstanley:mainfrom
mo-xiaoming:hobbes-logs
Open

add some perf log for unsweetenning process, and output IR to file#447
mo-xiaoming wants to merge 8 commits into
morganstanley:mainfrom
mo-xiaoming:hobbes-logs

Conversation

@mo-xiaoming

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

Copy link
Copy Markdown
Contributor

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