-
Notifications
You must be signed in to change notification settings - Fork 15
move to package:args for cli arg parsing #15
Conversation
@dcharkes Remind me to add the changelog and do the version bump after review (if required). Otherwise, done! |
Yeah, we want a changelog entry and version bump to 0.0.3 because we're changing the CLI, which is a breaking change. |
@mannprerak2, I'll leave the reviewing for this one up to you. 🚀 |
Bumped the version, added the changelog and few minor touches. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
final aotLantencyProc = await Process.start('benchmarks/latency.exe', [url]); | ||
Process.runSync('dart', ['compile', 'exe', 'benchmark/latency.dart']); | ||
final aotLantencyProc = | ||
await Process.start('benchmark/latency.exe', ['-u', url]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do the 'exe' files compiled by dart only work on windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No 😅. It is named as .exe
by default regardless of the platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes. I see it now in the documentation. Dart supports quite a few different compilation formats 😀
} | ||
final url = arguments['url'] as String; | ||
final throughputPrallelLimit = int.parse(arguments['limit'] as String); | ||
final duration = Duration(seconds: int.parse(arguments['time'] as String)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with half a second?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Duration
's seconds
param takes int
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should do milliseconds instead then, or convert a double manually. Because otherwise we can't test shorter durations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with milliseconds then 😀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got this result under short duration. Cronet is so much faster.
Latency Test Results
Mode | package:cronet | dart:io |
---|---|---|
JIT | 247.333 ms | 403.000 ms |
AOT | 240.444 ms | 373.000 ms |
Throughput Test Results (Duration: 500 ms)
Mode | package:cronet | dart:io |
---|---|---|
JIT | 30 out of 1024 | 0 out of 0 |
AOT | 26 out of 1024 | 0 out of 0 |
@dcharkes Reverted. Duration is now in second(s) again :) |
Continuation #8
package:args
for CLI argument parsing.bin/setup.dart
tool/
files. (Tools don't take any CLI arg)benchmark/
files.run_all.dart
due to the migration frombenchmarks/
tobenchmark/
(rename benchmark and example folder #14 )RangeError (index)
inbenchmark/throughput.dart
in case of 0 result.example
folder to fetch more pub points.Closes #12