Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

Commit

Permalink
update gitignore, benchmark readme, and macro tool output (#143)
Browse files Browse the repository at this point in the history
Some small cleanup stuff:

- Add macro tool output files to gitignore.
- Update benchmark readme to use `dart run`.
- log the total time to re-analyze from the macro_tool (I might be misunderstanding what this is trying to report though).
  • Loading branch information
jakemac53 authored Nov 20, 2024
1 parent 7b15d59 commit 7fa7e9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/.dart_tool
**/pubspec.lock
goldens/foo/lib/generated/**
*.macro_tool_output
3 changes: 2 additions & 1 deletion pkgs/_macro_tool/lib/macro_tool.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ class MacroTool {
}

stdout.write(
'Macros ran in in ${_applyResult!.firstResultAfter.inMilliseconds}ms,'
'Macros ran in ${_applyResult!.firstResultAfter.inMilliseconds}ms '
'(${_applyResult!.lastResultAfter.inMilliseconds}ms total),'
' watching...',
);
await events.first;
Expand Down
14 changes: 7 additions & 7 deletions tool/benchmark_generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

Generates code that uses macros, for benchmarking.

Example use, from the root of this package:
Example use, from the root of this repo:

```
dart bin/main.dart large macro 64
dart ../../pkgs/_macro_tool/bin/main.dart \
--workspace=../../goldens/foo \
--packageConfig=../../.dart_tool/package_config.json \
--script=../../goldens/foo/lib/generated/large/a0.dart \
--host=analyzer --watch
dart run benchmark_generator large macro 64
dart run _macro_tool \
--workspace=goldens/foo \
--packageConfig=.dart_tool/package_config.json \
--script=goldens/foo/lib/generated/large/a0.dart \
--host=analyzer watch
```

then change `goldens/foo/lib/generated/large/a0.dart` to see the refresh time.

0 comments on commit 7fa7e9d

Please sign in to comment.