When running some tests, I’m trying to understand ...
# general
c
When running some tests, I’m trying to understand why there’s such large differences in time, although it says they are both memoized: [SOLVED]
Copy code
✓ src/python/pants/backend/docker/util_rules/dependencies_test.py:tests succeeded in 60.21s (memoized).
✓ src/python/pants/backend/docker/util_rules/docker_binary_test.py:tests succeeded in 4.37s (memoized).
Anyone has any insights for me here (or what else to look for to dig further..?)
h
I believe that is the time it took to run originally, when it was memoized? Or are you seeing it actually take that long?
c
Ah, ok, yeah that makes sense.
Currently my computer is so laggish and nothing is working properly, so I think it needs a hard reboot…
But no you’re right, those times are from the original run, it seems.
w
yea, that is vaguely confusing
👍 1
we don’t currently record metadata around how long the cache hit or memoization itself took
c
I think it makes more sense to present the original time (perhaps the time used to get the cached/memoized result would be interesting in addition as well)
👍 1
h
yeah I agree it's useful to show original time. Otherwise imagine how frustrating it would be to try to find "what are my slowest tests?" You'd have to make sure caching and memoization is disabled
1
c
speaking of that, I had a thought earlier, about optionally sorting all the completed tests based on their execution time (to get the slowest at top/bottom)
h
c
Haha… yeah, about the same time, by the looks of it. 😄