-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add miq_har_file_parser #10
Open
NickLaMuro
wants to merge
15
commits into
master
Choose a base branch
from
har_file_parser
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A lib for generating `rails runner` scripts to run a sequence of requests for benchmarking the MIQ UI ruby backend requests.
In older versions of MIQ, `UiConstants` was a global constant is required to be autoloaded for many of the controller actions to work. Unfortunately, this was not done by default for the `rails runner` in the older versions of MIQ where this existed, so this adds an option to load it via the `miq_har_file_parser/cli`.
NickLaMuro
force-pushed
the
har_file_parser
branch
from
April 8, 2019 16:16
f32ecd6
to
414e59b
Compare
The help docs for the CLI allow for either passing a file.har as a final argument, or as a command line argument via the `--input` flag. Do to the way it was coded, it always forced using the result of the `HAR_FILE` ARGV instead of the parsed option. This change allows the arguments to work as expected.
Seems like Firefox supports multiple values for defining params: - One for handling the url params - And one for handling body params This fix attempts to munge the second one into the format of the first.
NOTE: MANY HOURS WASTED FIGURING THIS OUT!!1! Turns out that the rails session will automatically log you out if you are not in the same mode "http mode" (`http` or `https`), and this is not super obvious when using the integration test framework to run commands that this is happening (basically, stuff just starts redirecting to login on you, with no logging at all). Since all appliances are configured out of the box to use `https` in puma, this seemed like a safe default in the script to just enable `.https!` if we are on an appliance by just querying it. Might make it configurable in the future, but no promises.
Turns out that Chrome and Firefox sort the "entries" differently. The Firefox (sanely) is in chronological order, but the Chrome one (for whatever reason...) is not. Sorting by `startedDateTime` ensures that we are get the results in the order we requested them, allowing the generated script to function as expected. The `startedDateTime` is also added to the parsed requests hash, and displayed in the summary printout.
Another difference between Firefox and Chrome is that chrome uses decimal precision when displaying time (in milliseconds). This precision is not needed for our purposes, so a `.to_i` is called on the value to make it a consistent view between the two
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A lib for generating
rails runner
scripts to run a sequence of requests for benchmarking the MIQ UI ruby backend requests.