Skip to content

Commit

Permalink
Record per-target compile workflow stats when using RscCompile (#8092)
Browse files Browse the repository at this point in the history
### Problem

We would like to have metrics about how much of a build uses Rsc.

### Solution

Record the compile workflow a target uses under `RscCompile`
  • Loading branch information
wiwa authored and stuhood committed Jul 25, 2019
1 parent 89a6425 commit 1a1238e
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -454,10 +454,22 @@ def make_zinc_job(target, input_product_key, output_products, dep_keys):
# Otherwise, fail it.
on_success=ivts.update,
on_failure=ivts.force_invalidate)

workflow = rsc_compile_context.workflow

# Replica of JvmCompile's _record_target_stats logic
def record(k, v):
self.context.run_tracker.report_target_info(
self.options_scope,
compile_target,
['compile', k],
v
)
record('workflow', workflow.value)
record('execution_strategy', self.execution_strategy)

# Create the rsc job.
# Currently, rsc only supports outlining scala.
workflow = rsc_compile_context.workflow
workflow.resolve_for_enum_variant({
'zinc-only': lambda: None,
'zinc-java': lambda: None,
Expand Down

0 comments on commit 1a1238e

Please sign in to comment.