Comments (5)
For clarification and my understanding, what does the target user-experience look like?
My assumption reading this is:
// No need to import the `k6/timers` module
export default function () {
setTimeout(...) // timer functions are available in the runtime "natively", like in v8 browser runtimes
setInterval(...)
clearTimeout(...)
clearInterval(...)
}
If so, I think that makes a lot of sense, and although I'm not completely set on that, it is also something we might want to consider also for "Web APIs" we integrate in the future (webcrypto, streams, fetch (if we do), etc...) to provide a user-experience close to what is available in other runtimes.
🙇🏻
from k6.
Yes, that will be a thing that users will be able to do - without needing to import anything
from k6.
I feel that having these functions globally accessible is what users will expect. However, I can't say I'm a JavaScript expert, so I am unsure if my feelings are relevant.
from k6.
Similar to @olegbespalov, not a JS expert neither, but I guess that's what experienced JS users would expect, while for the rest it doesn't matter. So 👍🏻
from k6.
there is no event loop in Goja (TMK). So I am not sure who/what would call the global setInterval. Using Goja for this lib seems like a terrible mistake and frankly I am gonna run as far as I can in another direction (no offense but hopefully this helps other people..)
from k6.
Related Issues (20)
- Use K6 as a Go Module HOT 3
- Lots of EOF and status code 0 errors at high # of virtual users HOT 6
- Misleading error message when using invalid character in scenario name HOT 1
- Will k6 support distributed agents? HOT 2
- Add `--websocket-debug` similar to `--http-debug` HOT 1
- Drop `details` support in cloud error ResponseError
- upgrade xk6-dashboard to v0.7.3
- File resolution should print the filepath on error messages HOT 1
- Memory growth due to TrendSink of K6 Metrics HOT 2
- Test run hangs if dashboard open HOT 3
- Seeing Connectivity Issue in k6 Tool on using latest K6 Version(0.49.0) as opposed to older K6 Version(0.31.1) HOT 13
- Feature Request: Add API for specifying query parameters HOT 5
- JSON output format doesn't include group thresholds HOT 2
- K6_SYSTEM_TAGS environment variable not being read HOT 1
- Customised profiling in K6 HOT 5
- Permission denied when running k6 new using docker HOT 5
- Missing content-type: application/grpc when port set to 443 for grpc load test HOT 4
- Hosts options doesn't work well with non-lowercase hosts
- Allow access to the status of a gRPC stream call plus allowing to await the stream end HOT 1
- Make ReadableStream (WIP) implementation pass WPT test suite HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k6.