Skip to content
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

Share benchmarks #2

Closed
sonnyp opened this issue Jul 28, 2015 · 13 comments
Closed

Share benchmarks #2

sonnyp opened this issue Jul 28, 2015 · 13 comments
Assignees

Comments

@sonnyp
Copy link

sonnyp commented Jul 28, 2015

Would be awesome to use a url hash with tests code to share benchmarks.
Also stool could rely on 3rd party services such as gists for saving/sharing.

@albertxing
Copy link
Owner

Yes, I've been thinking about doing this. I don't think URL hashes will be feasible, the code may be too long to share.

Gists might be reasonable, I haven't figured out exactly how I'd implement this yet.

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

You can look at the documentation :
https://developer.github.com/v3/gists/#create-a-gist

It should do what you want 👍

@sonnyp
Copy link
Author

sonnyp commented Jul 28, 2015

http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers

I think 2000chars is good enough for many micro benchmarks.

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

There you go :
http://codepen.io/nobe4/pen/BNGpKZ?editors=101

@albertxing
Copy link
Owner

@sonnyp Agreed, however there's the issue of "shareability", e.g. is it okay to share a link that's ~200 characters long?

@nobe4 Thanks for the code snippet. The API is very simple and allows for anonymous posts, which is great. Also, the raw gist allows cross-origin requests, which allows us to retrieve the content via AJAX. The issue of how to integrate this into stool is still an issue. There needs to be a specific input format, and an import from gist option.

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

Do you want another snippet implementing the other side ?

@albertxing
Copy link
Owner

I don't think it's a matter of implementation - it's more of just deciding how we're going to implement it.
For example, what should the gist syntax be? Should we store each test case in a separate file in a single gist (a gist can have multiple files), or store them all in one file with some kind of separator between them?

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

I thinks, as we can separate files in gist, we should use it.
So for example, a file should be named _common and all the others depending on the test name.

@albertxing
Copy link
Owner

👍 that's what I was thinking as well

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

Btw I tried to develop some kind of wrapper around benchmark.js, do you think it can be usefull ?

@albertxing
Copy link
Owner

I think the Benchmark API is simple enough, and the code is not a huge mess (yet).
If you'd like to create a new issue regarding this, feel free to do so and we can discuss further

@nobe4
Copy link
Contributor

nobe4 commented Jul 28, 2015

You got it :)

@nobe4 nobe4 mentioned this issue Jul 28, 2015
@albertxing
Copy link
Owner

Okay, implemented in 917a904
Let me know if there's anything that needs to be changed, I will close this issue otherwise.

Thanks all for the great suggestions!

@albertxing albertxing self-assigned this Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants