hundreds-breakfast-49010
03/04/2020, 1:37 AMhundreds-breakfast-49010
03/04/2020, 1:38 AMhundreds-breakfast-49010
03/04/2020, 1:39 AMhundreds-breakfast-49010
03/04/2020, 1:39 AMEntryState::Running
hundreds-breakfast-49010
03/04/2020, 1:40 AMhundreds-breakfast-49010
03/04/2020, 1:41 AMEntryState::Running
and put the current Instant::now()
into its start_time
field isn't the right duration to be displaying to usershundreds-breakfast-49010
03/04/2020, 1:42 AMcontext_factory.spawn
hundreds-breakfast-49010
03/04/2020, 1:43 AMheavy_hitters
for the UI, so if that duration isnt helpful for users than maybe the heavy hitters list isn't eitherwitty-crayon-22786
03/04/2020, 1:43 AMwitty-crayon-22786
03/04/2020, 1:44 AMwitty-crayon-22786
03/04/2020, 1:44 AMhundreds-breakfast-49010
03/04/2020, 1:45 AMhappy-kitchen-89482
03/04/2020, 1:45 AMhappy-kitchen-89482
03/04/2020, 1:45 AMwitty-crayon-22786
03/04/2020, 1:47 AMhundreds-breakfast-49010
03/04/2020, 1:47 AMhundreds-breakfast-49010
03/04/2020, 1:47 AMwitty-crayon-22786
03/04/2020, 1:47 AMhappy-kitchen-89482
03/04/2020, 1:48 AMprocess_execution_local_parallelism
is doing in practice.happy-kitchen-89482
03/04/2020, 1:48 AMhundreds-breakfast-49010
03/04/2020, 1:49 AMbound
for BoundedCommandRunner
, but I'm not sure what that type is meant to do to begin withwitty-crayon-22786
03/04/2020, 1:49 AMhappy-kitchen-89482
03/04/2020, 1:49 AMtime
witty-crayon-22786
03/04/2020, 1:49 AMhappy-kitchen-89482
03/04/2020, 1:50 AMhappy-kitchen-89482
03/04/2020, 1:50 AMwitty-crayon-22786
03/04/2020, 1:51 AMwitty-crayon-22786
03/04/2020, 1:52 AMhappy-kitchen-89482
03/04/2020, 1:52 AMhappy-kitchen-89482
03/04/2020, 1:53 AMhappy-kitchen-89482
03/04/2020, 1:53 AMhundreds-breakfast-49010
03/04/2020, 1:53 AMBoundedCommandRunner
might not be the limiting factor in the use case we're debuggingwitty-crayon-22786
03/04/2020, 1:54 AMwitty-crayon-22786
03/04/2020, 1:54 AMhappy-kitchen-89482
03/04/2020, 1:54 AMwitty-crayon-22786
03/04/2020, 1:55 AMhundreds-breakfast-49010
03/04/2020, 1:55 AMhappy-kitchen-89482
03/04/2020, 1:55 AMhundreds-breakfast-49010
03/04/2020, 1:55 AMhundreds-breakfast-49010
03/04/2020, 1:56 AMNodeContext::spawn
is our own trait, it's not a futures-library thingwitty-crayon-22786
03/04/2020, 1:56 AMwitty-crayon-22786
03/04/2020, 1:56 AMhundreds-breakfast-49010
03/04/2020, 1:57 AMtask_executor
crate, and that's proxying to tokio
?witty-crayon-22786
03/04/2020, 1:57 AMwitty-crayon-22786
03/04/2020, 1:57 AMhundreds-breakfast-49010
03/04/2020, 1:58 AMwitty-crayon-22786
03/04/2020, 1:58 AMhundreds-breakfast-49010
03/04/2020, 1:58 AMhappy-kitchen-89482
03/04/2020, 1:58 AMhappy-kitchen-89482
03/04/2020, 1:58 AMwitty-crayon-22786
03/04/2020, 1:58 AMwitty-crayon-22786
03/04/2020, 2:00 AMhundreds-breakfast-49010
03/04/2020, 2:00 AMwitty-crayon-22786
03/04/2020, 2:00 AMwitty-crayon-22786
03/04/2020, 2:00 AMhundreds-breakfast-49010
03/04/2020, 2:01 AMwitty-crayon-22786
03/04/2020, 2:02 AMwitty-crayon-22786
03/04/2020, 2:02 AMhundreds-breakfast-49010
03/04/2020, 2:04 AMhundreds-breakfast-49010
03/04/2020, 2:04 AMhundreds-breakfast-49010
03/04/2020, 2:04 AMhundreds-breakfast-49010
03/04/2020, 2:05 AMwitty-crayon-22786
03/04/2020, 2:07 AMhappy-kitchen-89482
03/04/2020, 2:09 AMhappy-kitchen-89482
03/04/2020, 2:10 AMps
), and the timings from when they were spawned.witty-crayon-22786
03/04/2020, 2:10 AMhappy-kitchen-89482
03/04/2020, 2:10 AMwitty-crayon-22786
03/04/2020, 2:10 AMwitty-crayon-22786
03/04/2020, 2:11 AMwitty-crayon-22786
03/04/2020, 2:11 AMhundreds-breakfast-49010
03/04/2020, 2:13 AMrun
call happens: https://github.com/pantsbuild/pants/blob/master/src/rust/engine/graph/src/entry.rs#L265hundreds-breakfast-49010
03/04/2020, 2:13 AMhundreds-breakfast-49010
03/04/2020, 2:13 AMhundreds-breakfast-49010
03/04/2020, 2:14 AMcurrent_running_duration
works,hundreds-breakfast-49010
03/04/2020, 2:14 AMhappy-kitchen-89482
03/04/2020, 2:14 AMhappy-kitchen-89482
03/04/2020, 2:14 AMwitty-crayon-22786
03/04/2020, 2:15 AMwitty-crayon-22786
03/04/2020, 2:16 AMhundreds-breakfast-49010
03/04/2020, 2:18 AMhundreds-breakfast-49010
03/04/2020, 2:18 AMhundreds-breakfast-49010
03/04/2020, 2:19 AMwitty-crayon-22786
03/04/2020, 2:19 AMwitty-crayon-22786
03/04/2020, 2:19 AMwitty-crayon-22786
03/04/2020, 2:20 AMhundreds-breakfast-49010
03/04/2020, 2:20 AMhundreds-breakfast-49010
03/04/2020, 2:20 AMhundreds-breakfast-49010
03/04/2020, 2:21 AMwitty-crayon-22786
03/04/2020, 2:21 AMwitty-crayon-22786
03/04/2020, 2:21 AMred-balloon-89377
03/04/2020, 10:49 AMWrappedNode::run
. In particular, for EPRs we use the v2 notion of workunits
for that. While I don’t think we can use workunits for this (because they are recorded at the end of an EPRs execution), we can probably implement something similar to that for heavy_hitters. This could be as easy as keeping a Map<UserDisplayNameForNode, RealStartTime>
in the Context
, or maybe `Session`:
- Nodes would optionally add themselves to that map as part of executing the Future returned by the run
method.
- We would only render things from that map.
- At the end of the execution of a node, we could make it remove itself from the map.
Alternatively, we could create another method in the trait WrappedNode
, something like run_impl
, and rename all the current implementations of run
to run_impl
. Then, we can implement run
as a method in the trait that will do all the map finagling for us, something like (totally bogus syntax):
fn run(self, context: Context) -> NodeFuture<Value> {
future::create(move |_| { // register start time now in context, if I have a user_readable_name })
.and_then(|_| {
self.run(context)
})
.inspect(|_| { // de-register myself from the map })
}
This way, we leave run
unchanged, and we center this recording of times to one particular function.hundreds-father-404
03/04/2020, 1:09 PMwitty-crayon-22786
03/04/2020, 1:14 PMwitty-crayon-22786
03/04/2020, 1:15 PMwitty-crayon-22786
03/04/2020, 1:16 PMred-balloon-89377
03/04/2020, 2:13 PMCommandRunner
does have to decide when something is started.red-balloon-89377
03/04/2020, 2:13 PMhundreds-breakfast-49010
03/04/2020, 6:30 PMhundreds-breakfast-49010
03/04/2020, 6:30 PMhundreds-breakfast-49010
03/04/2020, 6:31 PMhundreds-breakfast-49010
03/04/2020, 6:32 PMred-balloon-89377
03/05/2020, 1:55 PMaverage-vr-56795
03/05/2020, 3:53 PMhundreds-father-404
03/05/2020, 3:57 PMI haven’t read through this whole thread - should I, or did this get sufficiently resolved?@average-vr-56795 If you have the time to spare, it would help to get your input. tl;dr we’ve been finding that resolving the requirements Pex is really slow in V2. One of the problems is that we believe
--v2-ui
reports timing in a way that doesn’t exactly reflect reality and makes the user believe things are slower than they really are. We’re trying to think of a way to improve the timing output for --v2-ui
average-vr-56795
03/05/2020, 3:58 PMaverage-vr-56795
03/05/2020, 5:11 PMelapsed_time
method on Node
, have that method consult an optional task-local for “time-actually-started” to override the field, and having the command runners set that task localwitty-crayon-22786
03/05/2020, 5:13 PMwitty-crayon-22786
03/05/2020, 5:24 PMif the primary goal is to "make sure the user sees something", then why should that be related to the teh number of CPU cores?@hundreds-breakfast-49010: no particular reason... But you can think of it a bit like all of the async code existing in service of actually starting long-running processes
witty-crayon-22786
03/05/2020, 5:25 PMwitty-crayon-22786
03/05/2020, 5:26 PMwitty-crayon-22786
03/05/2020, 5:28 PMwitty-crayon-22786
03/05/2020, 5:28 PMhundreds-breakfast-49010
03/05/2020, 7:36 PMhundreds-breakfast-49010
03/05/2020, 7:37 PMhundreds-breakfast-49010
03/05/2020, 7:37 PMaverage-vr-56795
03/06/2020, 11:37 AMaverage-vr-56795
03/06/2020, 11:37 AM