Commit Graph

4 Commits

Author SHA1 Message Date
Jesse Gibson
be781b5d8d Tether to UI, upgrade to gun@0.3, organize files, clean code, capture errors, add progress events, better type checking for patch.js, more polyfills, more reliable checking for finish events, server improvements
You can now boot up tests from the homepage using the UI. It's powered by jQuery.

The tests are now using the latest, greatest version of gun, v0.3.

Files now organized into folder "lib" for clarity and cleanliness.

Numerous code cleanliness improvements.

Now, if errors are passed to the acknowledgement listener, they're pushed to an array of errors on that request.

Now each time there's a response,  the statistics are recalculated and are passed to an optional progress callback.

Patch.js now has stronger type checking against the data it's been given.

Added more polyfills to aid in development, like wrapping console.log in a closure to bypass the console interface error.

The timeout accuracy and code clarity has been improved.

Server is now upgraded to use gun@0.3, and the level options have been better tailored to the application.
2016-01-07 14:20:10 -07:00
Jesse Gibson
c5e8625acc Full configuration, automatic browser tab manipulation, statistics, progress events, completion event, de-duplication of acknowledgments, accurate recursive test runners, prep for selenium instantiation, included polyfills and extensions.
New barrage of options now accepted (providing defaults in absence), such as a progress callback, a done callback and timeout configuration, a data generation function, etc...

Browser constructor meant to open new tabs, run the test (using the given options), and close the tab when finished. There is no loss of options by doing this (although it has had a notable effect on performance when the tab is not in focus).

Each progress event and the done event recieve the options object with statistics embeded in the "stats" property. It has details like the average latency, the total elapsed time, the acknowledged packets, the fastest/slowest times, etc...

Acknowledgments can fire more than once, and for now it dedupes those and only fires once. In the future I may change this to include every acknowledgment. For data!

The recursive test runner wasn't running the correct number of times (due to confusion and off-by-1 errors)... that has been fixed.

The test file checks to see if there were options globally declared. If so, run the test using those. In the future we may use selenium to boot up the browsers, and we'll need some way to kick off the test and provide options. That was a nice compromise.

I've included some useful polyfills (like interfacing with console.log so it can be passed naked to other functions, Object.keys polyfill for counting confirmed objects) and some extensions (like valMapDone).

Next steps include adding the gun instance to the options object, statistics for errors, node compatibility and the such.
2015-12-22 13:36:50 -07:00
Jesse Gibson
d38154cb6f Test gun by passing options, Browser constructor automatically begins a test on a new window, added package.json, patch function for options (validation/default values).
Exposed a function named "test" that takes an options object, with things like how many gun requests to fire in total, what data to send, where to put it, what peers to connect to, etc...

Exposed a Browser constructor that opens up a new window and runs the test function with the options provided, returning an interface to the window.

Added a patch function to validate the option input and provide defaults where there aren't any values.
2015-12-17 23:20:57 -07:00
Jesse Gibson
f6a4132efb Initial commit (boilerplate)
index.html used from @amark
2015-12-17 19:34:01 -07:00