Replies: 2 comments 3 replies
-
I don't know how to measure that but unrelated, you might find this article useful. As for reading, there's also this thread |
Beta Was this translation helpful? Give feedback.
2 replies
-
Running into the same issue, doesn't seem like we have a way to time events submitted directly onto the queue? In particular I was looking to time queue.copyExternalImageToTexture . Wondering if we could wrap in an error scope and time that...? Or maybe we can wrap in empty compute / render pipelines with just timers? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I wish to know how much time data transmission between CPU and GPU costs so that I can try to improve the overall WebGPU programs' performance. But till now I only know few ways to measure it and I don't really know are they correct.
GPUComputePassTimestampWrites
only has 2 time point for measurement (pass beginning and end). So it can't be used for instructions likequeue.writeBuffer()
. See also https://stackoverflow.com/questions/76713260/how-to-time-profile-see-when-tasks-are-complete-in-wgpu-targeting-web.queue.onSubmittedWorkDone()
before and after thequeue.writeBuffer()
and calculate the time cost in JS promise callbacks. I don't know is it correct and it seems not precise intuitively.So I wonder to know how to measure the time cost of:
createBuffer()
andqueue.writeBuffer()
;createBuffer()
for staging buffer andbuffer.mapAsync()
when reading.I've tried searched keywords like 'track''performace''writeBuffer' but can't get an answer. If any one can give me some ideas or figure out any mistakes in my thought I'll be much appreciated. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions