Skip to content

Commit 1b520f6

Browse files
committed
Enhance README update script to process multiple benchmark reports
- Updated `update_readme_from_report.py` to load and process three different comparison report JSON files: XLSX, DOCX, and Issues. - Implemented a new function to compute benchmark statistics for each report type and print summary statistics. - Refactored the benchmark section generation to support multiple languages and added detailed comparison report links. - Improved the logic for updating individual test case scores in the README files. - Ensured missing test cases are added to the README if not already present.
1 parent d1e6fd6 commit 1b520f6

8 files changed

Lines changed: 723 additions & 521 deletions

File tree

‎README.md‎

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@ byte[] pdfBytes = MiniPdf.ConvertToPdf(stream);
5757

5858

5959

60+
## Benchmark
61+
62+
MiniPdf output is compared against LibreOffice as the reference renderer across **373 test cases**.
63+
64+
| Report | Cases | 🟢 Excellent (≥90%) | 🟡 Acceptable (70%–90%) | 🔴 Needs Improvement (<70%) | Average Score |
65+
|---|---|---|---|---|---|
66+
| XLSX to PDF | 191 | 175 | 16 | 0 | 96.9% |
67+
| DOCX to PDF | 180 | 178 | 2 | 0 | 97.6% |
68+
| Issue XLSX Files | 2 | 1 | 1 | 0 | 83.8% |
69+
| **Total** | **373** | **354** | **19** | **0** | **97.2%** |
70+
71+
Scoring: text similarity 40% + visual similarity 40% + page count 20%
72+
6073
### Detailed Comparison Reports
6174

6275
- [XLSX Benchmark Report](tests/MiniPdf.Benchmark/reports/comparison_report.md) — XLSX conversion test cases
@@ -207,7 +220,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
207220
</tr>
208221
<tr>
209222
<td><b>classic18</b></td>
210-
<td>Large dataset 🟢 95.8%</td>
223+
<td>Large dataset 🟢 95.7%</td>
211224
</tr>
212225
<tr>
213226
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic18_large_dataset_p1_minipdf.png" width="320"/></td>
@@ -383,7 +396,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
383396
</tr>
384397
<tr>
385398
<td><b>classic40</b></td>
386-
<td>Scientific notation 🟢 99.7%</td>
399+
<td>Scientific notation 🟢 99.9%</td>
387400
</tr>
388401
<tr>
389402
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic40_scientific_notation_p1_minipdf.png" width="320"/></td>
@@ -415,7 +428,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
415428
</tr>
416429
<tr>
417430
<td><b>classic44</b></td>
418-
<td>Employee roster 🟢 98.2%</td>
431+
<td>Employee roster 🟢 98.0%</td>
419432
</tr>
420433
<tr>
421434
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic44_employee_roster_p1_minipdf.png" width="320"/></td>
@@ -431,7 +444,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
431444
</tr>
432445
<tr>
433446
<td><b>classic46</b></td>
434-
<td>Grade book 🟢 99.7%</td>
447+
<td>Grade book 🟢 99.6%</td>
435448
</tr>
436449
<tr>
437450
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic46_grade_book_p1_minipdf.png" width="320"/></td>
@@ -447,7 +460,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
447460
</tr>
448461
<tr>
449462
<td><b>classic48</b></td>
450-
<td>Survey results 🟢 99.3%</td>
463+
<td>Survey results 🟢 99.6%</td>
451464
</tr>
452465
<tr>
453466
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic48_survey_results_p1_minipdf.png" width="320"/></td>
@@ -471,7 +484,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
471484
</tr>
472485
<tr>
473486
<td><b>classic51</b></td>
474-
<td>Product catalog 🟢 97.6%</td>
487+
<td>Product catalog 🟢 98.5%</td>
475488
</tr>
476489
<tr>
477490
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic51_product_catalog_p1_minipdf.png" width="320"/></td>
@@ -575,7 +588,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
575588
</tr>
576589
<tr>
577590
<td><b>classic64</b></td>
578-
<td>Employee directory with photo 🟢 99.2%</td>
591+
<td>Employee directory with photo 🟢 99.1%</td>
579592
</tr>
580593
<tr>
581594
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic64_employee_directory_with_photo_p1_minipdf.png" width="320"/></td>
@@ -591,7 +604,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
591604
</tr>
592605
<tr>
593606
<td><b>classic66</b></td>
594-
<td>Invoice with logo 🟢 99.3%</td>
607+
<td>Invoice with logo 🟢 99.2%</td>
595608
</tr>
596609
<tr>
597610
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic66_invoice_with_logo_p1_minipdf.png" width="320"/></td>
@@ -607,7 +620,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
607620
</tr>
608621
<tr>
609622
<td><b>classic68</b></td>
610-
<td>Restaurant menu 🟢 98.8%</td>
623+
<td>Restaurant menu 🟢 98.6%</td>
611624
</tr>
612625
<tr>
613626
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic68_restaurant_menu_p1_minipdf.png" width="320"/></td>
@@ -623,7 +636,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
623636
</tr>
624637
<tr>
625638
<td><b>classic70</b></td>
626-
<td>Product catalog with images 🟢 99.6%</td>
639+
<td>Product catalog with images 🟢 99.2%</td>
627640
</tr>
628641
<tr>
629642
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic70_product_catalog_with_images_p1_minipdf.png" width="320"/></td>
@@ -887,39 +900,39 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
887900
</tr>
888901
<tr>
889902
<td><b>classic103</b></td>
890-
<td>Pie chart with labels 🟡 88.3%</td>
903+
<td>Pie chart with labels 🟡 86.9%</td>
891904
</tr>
892905
<tr>
893906
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic103_pie_chart_with_labels_p1_minipdf.png" width="320"/></td>
894907
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic103_pie_chart_with_labels_p1_reference.png" width="320"/></td>
895908
</tr>
896909
<tr>
897910
<td><b>classic104</b></td>
898-
<td>Combo bar line chart 🟡 81.7%</td>
911+
<td>Combo bar line chart 🟡 81.6%</td>
899912
</tr>
900913
<tr>
901914
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic104_combo_bar_line_chart_p1_minipdf.png" width="320"/></td>
902915
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic104_combo_bar_line_chart_p1_reference.png" width="320"/></td>
903916
</tr>
904917
<tr>
905918
<td><b>classic105</b></td>
906-
<td>3d bar chart 🟡 86.0%</td>
919+
<td>3d bar chart 🟡 85.8%</td>
907920
</tr>
908921
<tr>
909922
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic105_3d_bar_chart_p1_minipdf.png" width="320"/></td>
910923
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic105_3d_bar_chart_p1_reference.png" width="320"/></td>
911924
</tr>
912925
<tr>
913926
<td><b>classic106</b></td>
914-
<td>3d pie chart 🟢 97.2%</td>
927+
<td>3d pie chart 🟢 96.7%</td>
915928
</tr>
916929
<tr>
917930
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic106_3d_pie_chart_p1_minipdf.png" width="320"/></td>
918931
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic106_3d_pie_chart_p1_reference.png" width="320"/></td>
919932
</tr>
920933
<tr>
921934
<td><b>classic107</b></td>
922-
<td>Multi series line 🟡 80.2%</td>
935+
<td>Multi series line 🟡 80.6%</td>
923936
</tr>
924937
<tr>
925938
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic107_multi_series_line_p1_minipdf.png" width="320"/></td>
@@ -951,7 +964,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
951964
</tr>
952965
<tr>
953966
<td><b>classic111</b></td>
954-
<td>Chart with axis labels 🟢 92.6%</td>
967+
<td>Chart with axis labels 🟢 92.1%</td>
955968
</tr>
956969
<tr>
957970
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic111_chart_with_axis_labels_p1_minipdf.png" width="320"/></td>
@@ -967,23 +980,23 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
967980
</tr>
968981
<tr>
969982
<td><b>classic113</b></td>
970-
<td>Chart sheet 🟡 87.9%</td>
983+
<td>Chart sheet 🟡 86.4%</td>
971984
</tr>
972985
<tr>
973986
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic113_chart_sheet_p1_minipdf.png" width="320"/></td>
974987
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic113_chart_sheet_p1_reference.png" width="320"/></td>
975988
</tr>
976989
<tr>
977990
<td><b>classic114</b></td>
978-
<td>Chart large dataset 🟢 91.0%</td>
991+
<td>Chart large dataset 🟢 91.6%</td>
979992
</tr>
980993
<tr>
981994
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic114_chart_large_dataset_p1_minipdf.png" width="320"/></td>
982995
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic114_chart_large_dataset_p1_reference.png" width="320"/></td>
983996
</tr>
984997
<tr>
985998
<td><b>classic115</b></td>
986-
<td>Chart negative values 🟢 92.4%</td>
999+
<td>Chart negative values 🟢 92.1%</td>
9871000
</tr>
9881001
<tr>
9891002
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic115_chart_negative_values_p1_minipdf.png" width="320"/></td>
@@ -999,23 +1012,23 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
9991012
</tr>
10001013
<tr>
10011014
<td><b>classic117</b></td>
1002-
<td>Stock ohlc chart 🟡 80.5%</td>
1015+
<td>Stock ohlc chart 🟡 80.9%</td>
10031016
</tr>
10041017
<tr>
10051018
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic117_stock_ohlc_chart_p1_minipdf.png" width="320"/></td>
10061019
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic117_stock_ohlc_chart_p1_reference.png" width="320"/></td>
10071020
</tr>
10081021
<tr>
10091022
<td><b>classic118</b></td>
1010-
<td>Bar chart custom colors 🟢 96.0%</td>
1023+
<td>Bar chart custom colors 🟢 95.5%</td>
10111024
</tr>
10121025
<tr>
10131026
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic118_bar_chart_custom_colors_p1_minipdf.png" width="320"/></td>
10141027
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic118_bar_chart_custom_colors_p1_reference.png" width="320"/></td>
10151028
</tr>
10161029
<tr>
10171030
<td><b>classic119</b></td>
1018-
<td>Dashboard multi charts 🟢 92.2%</td>
1031+
<td>Dashboard multi charts 🟢 92.1%</td>
10191032
</tr>
10201033
<tr>
10211034
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic119_dashboard_multi_charts_p1_minipdf.png" width="320"/></td>
@@ -1063,7 +1076,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
10631076
</tr>
10641077
<tr>
10651078
<td><b>classic125</b></td>
1066-
<td>Solid fills 🟢 99.5%</td>
1079+
<td>Solid fills 🟢 99.2%</td>
10671080
</tr>
10681081
<tr>
10691082
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic125_solid_fills_p1_minipdf.png" width="320"/></td>
@@ -1119,7 +1132,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
11191132
</tr>
11201133
<tr>
11211134
<td><b>classic132</b></td>
1122-
<td>Striped table 🟢 99.1%</td>
1135+
<td>Striped table 🟢 99.0%</td>
11231136
</tr>
11241137
<tr>
11251138
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic132_striped_table_p1_minipdf.png" width="320"/></td>
@@ -1135,7 +1148,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
11351148
</tr>
11361149
<tr>
11371150
<td><b>classic134</b></td>
1138-
<td>Heatmap 🟢 98.9%</td>
1151+
<td>Heatmap 🟢 98.8%</td>
11391152
</tr>
11401153
<tr>
11411154
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic134_heatmap_p1_minipdf.png" width="320"/></td>
@@ -1207,7 +1220,7 @@ All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown f
12071220
</tr>
12081221
<tr>
12091222
<td><b>classic143</b></td>
1210-
<td>Colored tabs 🟢 99.8%</td>
1223+
<td>Colored tabs 🟢 100.0%</td>
12111224
</tr>
12121225
<tr>
12131226
<td><img src="tests/MiniPdf.Benchmark/reports/images/classic143_colored_tabs_p1_minipdf.png" width="320"/></td>

0 commit comments

Comments
 (0)