Skip to content

Move JMeter HAR import filtering server-side (server-first principle) #89

@davidcampbelldc

Description

@davidcampbelldc

Summary

JMeter HAR import filtering currently happens client-side in Java. This violates the server-first design principle. Move it server-side to match the Locust path.

Current State

Path Filtering Location Server-First?
Locust editor Client sends exclude_patterns regex → _prepare_har_for_upload() in app.py applies it Yes
JMeter plugin HarConvertorGui.java + DCAIHarImportGui.java apply include/exclude regex during JMX generation in Java No

Problem

  • Filtering logic in Java means we can't improve it without releasing a new JMeter plugin JAR
  • Can't add the smart platform-agnostic heuristics (Platform-agnostic HAR import intelligence (smart filtering & analysis) #88) to JMeter path without server-side processing
  • Two separate codebases doing the same job = maintenance burden
  • JMeter users don't benefit from improvements made to the Locust filtering path

Proposed Change

  1. JMeter plugin sends the raw HAR (or user's filter preferences) to server
  2. Server applies filtering (same _prepare_har_for_upload() path, or new endpoint)
  3. Server returns filtered/processed HAR data
  4. JMeter plugin generates JMX from the server-filtered data
  5. Remove client-side filtering logic from Java

Files Affected

  • DCAIHarImportGui.java (3,636 lines) — remove client-side filtering
  • HarConvertorGui.java — remove include/exclude regex application
  • DO/har-service/app.py — extend _prepare_har_for_upload() or add new endpoint for JMeter HAR processing

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions