Comments (5)
I think that'll be usable for wall time, but the on-cpu time will still be microseconds multiplied up – not sure if you'd consider that a problem?
I'll have a go at this soon. I've been meaning to check out the new UI anyway. (It looks amazing, btw!)
from php-spx.
Damn you're right. I've just forgot the CPU time component. We need the same resolution for both timers otherwise this could lead to some disturbing inconsistencies.
However wall / cpu time inconsistency is theorycally handled. I will check the current behavior on Linux with 1ns wall time and 1us cpu time.
I've also seen here that some later macOS versions have clock_gettime support. According to statcounter.com macOS 10.12+ versions seem to have 60%+ market shares.
from php-spx.
Indeed (If you recall, in my initial impl I polyfilled it for < 10.12 because it was called globally, but then you consolidated all timing into spx_resource_stats-...
).
It looks like it supports CLOCK_PROCESS_CPUTIME_ID
too, which is great.
Personally I'd like to keep compatibility for 10.11, at least for now (colleagues & special snowflakes)...so how about I implement nsec resolution using clock_gettime
for 10.12+ and fall back to usec for <= 10.11? The fallback mess will be isolated to only spx_resource_stats-macos.c
.
from php-spx.
Yes, this is what I was thinking about.
I do not want to break compatibility with 10.11-, but we can do OS version dispatching (confined to spx_resource_stats-macos.c as you said or even subfiles if implementations are totally differents) to implement the optimal clock for each version.
from php-spx.
Fixed by #36
from php-spx.
Related Issues (20)
- Join Github sponsor HOT 1
- Feature request: downloadable reports HOT 1
- Do not enable SPX when JIT is enabled HOT 3
- Core dumped when executing with long arguments HOT 5
- Link to code.jquery.com HOT 2
- UI / Report: highlight a partircular (or pattern) function call count as a dynamic metric
- Feature request: visualize static and instance methods differently
- Feature Request: SQL Query time HOT 1
- Accessibility issue. Light mode needed as not everyone can see the dark contrast. HOT 2
- PHP 5.4 support HOT 1
- Web UI not loading HOT 1
- Support for PHP 8.3
- Potential misinformation about leak HOT 3
- No UI on site hosted behind Reverse Proxy HOT 3
- ESM modules resolution error HOT 1
- File not found. HOT 1
- Install fails in MacOS Ventura HOT 4
- SPX does not intercept when using built-in server HOT 1
- configure error on macOS : cannot find zlib HOT 3
- spx.so: undefined symbol: gc_globals HOT 4
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 php-spx.