'1' ), $page_url ), 'wpdo_post_stress_cleanup' ); // Read-only display banner — server-set redirect message, no form processing. // phpcs:ignore WordPress.Security.NonceVerification.Recommended $msg_raw = isset( $_GET['wpdo_msg'] ) ? sanitize_text_field( wp_unslash( (string) $_GET['wpdo_msg'] ) ) : ''; $msg_text = ''; $msg_class = ''; if ( '' !== $msg_raw ) { if ( str_starts_with( $msg_raw, 'stress_cleanup_' ) ) { $n = (int) substr( $msg_raw, strlen( 'stress_cleanup_' ) ); $msg_text = sprintf( /* translators: %s: count */ __( '已清除 %s 個 stress test posts(連同 wp_postmeta + 7 張 flat 表的對應 row)。', '2meet-data-optimizer' ), number_format_i18n( $n ) ); $msg_class = 'notice-success'; } elseif ( str_starts_with( $msg_raw, 'err_' ) ) { $msg_text = __( '錯誤:請查看 wpdo_errors 日誌。', '2meet-data-optimizer' ); $msg_class = 'notice-error'; } } // Live state from the new state machine — drives initial render of cards. $state = class_exists( 'TMDO_Post_Stress_Tester' ) ? TMDO_Post_Stress_Tester::get_progress( false ) : array(); $wpdo_pst_stat = (string) ( $state['status'] ?? 'idle' ); $is_running = ( 'running' === $wpdo_pst_stat || 'benchmarking' === $wpdo_pst_stat ); // Map of post_type → seed key count, surfaced inline next to the dropdown. $post_type_options = array( 'product' => array( 'product (WC)', 5 ), 'hp_listing' => array( 'hp_listing (HivePress)', 7 ), 'hp_request' => array( 'hp_request', 5 ), 'hp_vendor' => array( 'hp_vendor', 5 ), 'attachment' => array( 'attachment', 2 ), 'nav_menu_item' => array( 'nav_menu_item', 5 ), 'post' => array( 'post', 2 ), ); ?>

⚠️

1:

⚠️ ' . esc_html( $current_post_mode ) . '' ); ?>

  1. ', '' ); ?>
> > > >
⚡ Fast 🐢 Realistic
disabled wp_postmeta 5 rows / flat 0 → 1:5(無優化) wp_postmeta 5 / flat 0 → 1:5(無優化)
dual_write wp_postmeta 5 / flat 0 → 1:5 wp_postmeta 5 + flat 1 → 1:5(有 flat 但 wp_postmeta 不減)
shadow_read wp_postmeta 5 / flat 0 → 1:5 wp_postmeta 5 + flat 1 → 1:5(讀走 flat,寫仍雙寫)
aeav_only wp_postmeta 5(直 SQL 繞過 Hook Bus)/ flat 0 → 1:5 ⚠️ wp_postmeta 0 / flat 1 → 0:1(完全優化)

insert,故意繞過 Hook Bus → 即使 mode=aeav_only 也會寫滿 wp_postmeta(用途:快速灌 fixture 給 Query Router benchmark)。驗證反 EAV 優化效果一律用 Realistic。', '2meet-data-optimizer' ); ?>


· · mode %
/ posts/sec
MB

product _price, _regular_price, _stock, _stock_status, _sku wp_wpdo_post_wc_product
hp_listing hp_price, hp_status, hp_featured, hp_verified, hp_vendor, hp_view_count, hp_expired_time wp_wpdo_post_hp_listing_core
hp_request hp_status, hp_user, hp_budget, hp_view_count, hp_expired_time wp_wpdo_post_hp_request_core
hp_vendor hp_user, hp_verified, hp_hourly_rate, hp_rating_count, hp_rating wp_wpdo_post_hp_vendor_core
attachment _wp_attached_file, _wp_attachment_image_alt wp_wpdo_post_attachment
nav_menu_item _menu_item_type, _menu_item_object_id, _menu_item_object, _menu_item_target, _menu_item_url wp_wpdo_post_nav_menu_item
post _thumbnail_id, _edit_last wp_wpdo_post_wp_core