Skip to content

Develop JavaScript alternative to vt-driver.php #19

@bobbingwide

Description

@bobbingwide

The Slog admin page has tabs to view reports, compare results etc.
It doesn't yet have the ability to run performance tests.
It would be nice to be able to drive the performance comparison testing directly from the Slog admin page.

Requirements

There would be two methods

  1. Run the same query limit times.
  2. Run a set of queries from a filtered file, performing up to limit times.

Proposed solution

MVP

  • Develop a Driver tab that runs XMLHttpRequests to the server
  • Support a loop that will run the request limit times
  • Provide visual feedback so show that the loop is working and the results

Optional extras

  • Make it easily cancellable
  • Prevent the Run button from being pressed multiple times
  • Support loading a filtered file to provide the URLs for each request
  • Dynamically display the results in a chart
  • Allow setting of the daily trace summary file name from the Driver tab

Assumptions, Limitations, Questions

  • It'll be easier to write using XMLHttpRequests than fetch().
  • I can write it using native JavaScript
  • No need to use React / Gutenberg - how possible would that be anyway?
  • No need for internationalization.
  • Logic only needed for admin.
  • It'll be easy to write as plain HTML and JavaScript then convert to WordPress
  • Could most of the driver logic be written as ALL JavaScript?
  • Is CSS needed to style the output?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions