This commit is contained in:
Vadim 2023-10-02 13:50:38 +02:00
parent e27ad9da85
commit 6dca7550b3
3 changed files with 5 additions and 39 deletions

View file

@ -1,49 +1,15 @@
timeline_name="$1" timeline_name="$1"
csv_filename="$2"
if [[ -n "$timeline_name" ]]; then if [[ -n "$timeline_name" ]]; then
if [[ -z "$csv_filename" ]]; then
csv_filename="${timeline_name}"
fi
echo "====== Extracting & merging ${timeline_name} timelines ======" echo "====== Extracting & merging ${timeline_name} timelines ======"
echo "" >>${csv_filename}.csv
echo "${timeline_name}" >>${csv_filename}.csv
extent_micros="timeExtentMicros" extent_micros="timeExtentMicros"
timelines=$(find ./build -maxdepth 1 -name "${timeline_name}*.timeline.json" -print) timelines=$(find ./build -maxdepth 1 -name "${timeline_name}*.timeline.json" -print)
for i in "${timelines[@]}"; do for i in "${timelines[@]}"; do
benchextract $i
extent_micros+="$(grep -A0 -h '"timeExtentMicros":' $i | grep -o " [0-9]*")" extent_micros+="$(grep -A0 -h '"timeExtentMicros":' $i | grep -o " [0-9]*")"
done done
echo $extent_micros | tr ' ' ',' >>${csv_filename}.csv echo $extent_micros | tr ' ' ',' >>${csv_filename}.csv
metrics=(
"average_frame_build_time_millis"
"90th_percentile_frame_build_time_millis"
"99th_percentile_frame_build_time_millis"
"worst_frame_build_time_millis"
"average_rasterizer_time_millis"
"90th_percentile_rasterizer_time_millis"
"99th_percentile_rasterizer_time_millis"
"worst_frame_rasterizer_time_millis"
)
timeline_summaries=$(find ./build -maxdepth 1 -name "${timeline_name}*.timeline_summary.json" -print)
for i in "${timeline_summaries[@]}"; do
metrics[0]+="$(grep -A0 -h '"average_frame_build_time_millis":' $i | grep -o " [0-9.]*")"
metrics[1]+="$(grep -A0 -h '"90th_percentile_frame_build_time_millis":' $i | grep -o " [0-9.]*")"
metrics[2]+="$(grep -A0 -h '"99th_percentile_frame_build_time_millis":' $i | grep -o " [0-9.]*")"
metrics[3]+="$(grep -A0 -h '"worst_frame_build_time_millis":' $i | grep -o " [0-9.]*")"
metrics[4]+="$(grep -A0 -h '"average_frame_rasterizer_time_millis":' $i | grep -o " [0-9.]*")"
metrics[5]+="$(grep -A0 -h '"90th_percentile_frame_rasterizer_time_millis":' $i | grep -o " [0-9.]*")"
metrics[6]+="$(grep -A0 -h '"99th_percentile_frame_rasterizer_time_millis":' $i | grep -o " [0-9.]*")"
metrics[7]+="$(grep -A0 -h '"worst_frame_rasterizer_time_millis":' $i | grep -o " [0-9.]*")"
done
for metric in "${metrics[@]}"; do
echo $metric | tr ' ' ',' >>${csv_filename}.csv
done
benchmarks=$(find ./build -maxdepth 1 -name "${timeline_name}*.timeline.benchmark" -print) benchmarks=$(find ./build -maxdepth 1 -name "${timeline_name}*.timeline.benchmark" -print)
benchmerge $benchmarks benchmerge $benchmarks
else else

View file

@ -24,7 +24,6 @@ import 'package:lightmeter/screens/metering/components/shared/readings_container
import 'package:lightmeter/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/dialog_picker/widget_picker_dialog.dart'; import 'package:lightmeter/screens/metering/components/shared/readings_container/components/shared/animated_dialog_picker/components/dialog_picker/widget_picker_dialog.dart';
import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/components/equipment_profile_container/widget_container_equipment_profile.dart'; import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/components/equipment_profile_container/widget_container_equipment_profile.dart';
import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart'; import 'package:lightmeter/screens/settings/components/metering/components/equipment_profiles/components/equipment_profile_screen/screen_equipment_profile.dart';
import 'package:lightmeter/screens/settings/screen_settings.dart';
import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart'; import 'package:m3_lightmeter_iap/m3_lightmeter_iap.dart';
import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart'; import 'package:m3_lightmeter_resources/m3_lightmeter_resources.dart';
import 'package:mocktail/mocktail.dart'; import 'package:mocktail/mocktail.dart';

View file

@ -2,18 +2,18 @@ flutter --version
fvm flutter build apk \ fvm flutter build apk \
--dart-define="cameraPreviewAspectRatio=240/320" \ --dart-define="cameraPreviewAspectRatio=240/320" \
--dart-define="cameraStubImage=assets/camera_stub_image.jpg" \ --dart-define="cameraStubImage=assets/camera_stub_image.jpg" \
--target=integration_test/generate_screenshots.dart \ --target=integration_test/metering_test.dart \
--profile \ --profile \
--flavor=dev --flavor=dev
for n in {1..5}; do for n in {1..2}; do
echo "============ Run number ${n} ============" echo "============ Run number ${n} ============"
flutter drive \ flutter drive \
--dart-define="cameraPreviewAspectRatio=240/320" \ --dart-define="cameraPreviewAspectRatio=240/320" \
--dart-define="cameraStubImage=assets/camera_stub_image.jpg" \ --dart-define="cameraStubImage=assets/camera_stub_image.jpg" \
--driver=test_driver/screenshot_driver.dart \ --driver=test_driver/performance_driver.dart \
--target=integration_test/generate_screenshots.dart \ --target=integration_test/metering_test.dart \
--profile \ --profile \
--flavor=dev \ --flavor=dev \
--no-dds \ --no-dds \
@ -22,3 +22,4 @@ for n in {1..5}; do
--use-application-binary=build/app/outputs/flutter-apk/app-dev-profile.apk --use-application-binary=build/app/outputs/flutter-apk/app-dev-profile.apk
done done
sh integration_test/extract_benchmarks.sh toggle_iso_picker_baseline