data: A3 提效对比实验数据(23 样例 + 人工基线 + 插件实测,整体提速约 266 倍)

- data/efficiency-samples/ 23 个多语言样例 + data/manual-review-tool.html 人工审核工具
- tests/measure/measure-plugin-samples.mjs 四语言插件侧测量脚本
- tests/measure/compare-a3.mjs 聚合对比 + results(插件实测/人工基线/comparison)
- performance-comparison.md 填实基线对比与结论;README 效果总结由占位改为真实数据
This commit is contained in:
范智鹏
2026-08-27 22:54:07 +08:00
parent e469554691
commit 3280836124
33 changed files with 3710 additions and 36 deletions
+22
View File
@@ -0,0 +1,22 @@
/* header panel styles */
.header-card {
color: #FFFFFF;
background: #FFF1A2B;
margin: 0px;
padding: 12px 12px;
-webkit-border-radius: 6px;
border: 1px solid #dddddd;
}
.header-title {
font-size: 16px;
font-weight: 700;
color: #333333;
color: #444444;
}
.header-actions {
display: flex;
gap: 8px;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
+22
View File
@@ -0,0 +1,22 @@
/* sidebar panel styles */
.sidebar-card {
color: #FFFFFF;
background: #FFF1A2B;
margin: 0px;
padding: 12px 12px;
-webkit-border-radius: 6px;
border: 1px solid #dddddd;
}
.sidebar-title {
font-size: 16px;
font-weight: 700;
color: #333333;
color: #444444;
}
.sidebar-actions {
display: flex;
gap: 8px;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
+22
View File
@@ -0,0 +1,22 @@
/* footer panel styles */
.footer-card {
color: #FFFFFF;
background: #FFF1A2B;
margin: 0px;
padding: 12px 12px;
-webkit-border-radius: 6px;
border: 1px solid #dddddd;
}
.footer-title {
font-size: 16px;
font-weight: 700;
color: #333333;
color: #444444;
}
.footer-actions {
display: flex;
gap: 8px;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
+22
View File
@@ -0,0 +1,22 @@
/* modal panel styles */
.modal-card {
color: #FFFFFF;
background: #FFF1A2B;
margin: 0px;
padding: 12px 12px;
-webkit-border-radius: 6px;
border: 1px solid #dddddd;
}
.modal-title {
font-size: 16px;
font-weight: 700;
color: #333333;
color: #444444;
}
.modal-actions {
display: flex;
gap: 8px;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
+22
View File
@@ -0,0 +1,22 @@
/* toast panel styles */
.toast-card {
color: #FFFFFF;
background: #FFF1A2B;
margin: 0px;
padding: 12px 12px;
-webkit-border-radius: 6px;
border: 1px solid #dddddd;
}
.toast-title {
font-size: 16px;
font-weight: 700;
color: #333333;
color: #444444;
}
.toast-actions {
display: flex;
gap: 8px;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.10);
}
@@ -0,0 +1,28 @@
public class InventoryService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
@@ -0,0 +1,28 @@
public class NotifyService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
@@ -0,0 +1,28 @@
public class OrderService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
@@ -0,0 +1,28 @@
public class PaymentService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
@@ -0,0 +1,28 @@
public class ReportService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
@@ -0,0 +1,28 @@
public class UserService {
private static final String DEFAULT_USER = "guest";
public void register(String userName) {
String password = "admin123";
System.out.println("register user: " + userName);
try {
persist(userName);
} catch (Exception e) {
}
int leftover = computeChecksum(userName);
audit(DEFAULT_USER);
}
private int computeChecksum(String value) {
String copy = value.toString();
return copy.length();
}
private void persist(String userName) {
// placeholder persistence
}
private void audit(String actor) {
System.out.println("audit by " + actor);
}
}
+39
View File
@@ -0,0 +1,39 @@
// sample-1: order service module
var config = { retries: 3 };
function orderProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function orderValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function orderUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { orderProcess, orderValidate, orderUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-2: inventory service module
var config = { retries: 3 };
function inventoryProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function inventoryValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function inventoryUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { inventoryProcess, inventoryValidate, inventoryUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-3: billing service module
var config = { retries: 3 };
function billingProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function billingValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function billingUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { billingProcess, billingValidate, billingUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-4: customer service module
var config = { retries: 3 };
function customerProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function customerValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function customerUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { customerProcess, customerValidate, customerUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-5: shipping service module
var config = { retries: 3 };
function shippingProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function shippingValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function shippingUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { shippingProcess, shippingValidate, shippingUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-6: coupon service module
var config = { retries: 3 };
function couponProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function couponValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function couponUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { couponProcess, couponValidate, couponUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-7: refund service module
var config = { retries: 3 };
function refundProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function refundValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function refundUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { refundProcess, refundValidate, refundUnsafe, config };
+39
View File
@@ -0,0 +1,39 @@
// sample-8: invoice service module
var config = { retries: 3 };
function invoiceProcess(items) {
var total = 0;
for (var i = 0; i < items.length; i++) {
total += items[i].amount;
}
if (total == 0) {
return null;
}
return total;
}
function invoiceValidate(record) {
var shadowed = record.id;
function inner() {
var shadowed = record.alt;
return shadowed;
}
if (record.value === record.value) {
inner();
}
return shadowed;
}
function invoiceUnsafe(input) {
var unused = computeLegacy(input);
eval(input.expression);
debugger;
}
function computeLegacy(x) {
if (x.pending) {}
x.count = x.count;
return x;
}
module.exports = { invoiceProcess, invoiceValidate, invoiceUnsafe, config };
@@ -0,0 +1,8 @@
-- daily-orders report query
select u.user_id,u.user_name,o.order_id,o.amount
from t_user u
join t_order o on u.user_id = o.user_id
where u.status = 'active'
and o.created_at > sysdate - 30
and o.amount > 100
ORDER BY o.amount desc
@@ -0,0 +1,8 @@
-- monthly-revenue summary query
SELECT d.dept_name, COUNT(*) AS total
FROM t_order o
JOIN t_user u ON o.user_id = u.user_id
JOIN t_dept d ON u.dept_id = d.dept_id
WHERE o.status = 'paid'
GROUP BY d.dept_name
having total > 5
@@ -0,0 +1,8 @@
-- active-users report query
select u.user_id,u.user_name,o.order_id,o.amount
from t_user u
join t_order o on u.user_id = o.user_id
where u.status = 'active'
and o.created_at > sysdate - 30
and o.amount > 100
ORDER BY o.amount desc
@@ -0,0 +1,8 @@
-- top-departments summary query
SELECT d.dept_name, COUNT(*) AS total
FROM t_order o
JOIN t_user u ON o.user_id = u.user_id
JOIN t_dept d ON u.dept_id = d.dept_id
WHERE o.status = 'paid'
GROUP BY d.dept_name
having total > 5