https://pantsbuild.org/ logo
#development
Title
# development
h

hundreds-father-404

01/20/2021, 8:58 PM
Hey @fast-nail-55400, I'm trying to figure out how to test that counters changed in this new speculation test. I have a
WorkunitStore
value via
let workunit_store = WorkunitStore::setup_for_tests();
, and wanted to call the underlying
.metrics_data: MetricsData
, but it's a private field Any pointers?
Possibly related, I am a little confused why
Workunit
has a
counters
field. My understanding is that we have n number of workunits, and I'm surprised the counter isn't a global singleton
f

fast-nail-55400

01/20/2021, 9:03 PM
because counter increments are associated with a particular time span, and in the future, and it is possible to partially aggregate that counter along only parts of the workunut graph to see what value the counter holds in only part of the graph
👍 1
💡 1
(even if, for example, the toolchain plugin only does global aggregation currently)
the workunit’s counters are exposed to streamnig workunit handlers
I guess we don’t have a mechanism is Rust to expose completed workunits?
h

hundreds-father-404

01/20/2021, 9:06 PM
I don't think we do - would you be free to pair for a few minutes to chart the best path forward for testing this? Speculation tests are now good to go otherwise 🙂
👍 1
🤘 1