> ## Documentation Index
> Fetch the complete documentation index at: https://site.aspect.build/llms.txt
> Use this file to discover all available pages before exploring further.

# Measuring results

> Compare a trial against your current CI on the same commits: what to measure, where each number comes from, and how to compare fairly.

export const gatedAccess = (user, group) => {
  const loggedIn = !!(user && user.loggedIn);
  const groups = user && user.tenantMetadata && user.tenantMetadata.docsGroups || [];
  if (loggedIn && (!group || groups.indexOf(group) >= 0)) {
    return "entitled";
  }
  return loggedIn ? "signed-in" : "anonymous";
};

export const GatedLink = ({access, href, group, children}) => {
  const note = group ? "Aspect Enterprise customers" : "free Aspect account";
  const muted = {
    fontSize: "0.85em",
    opacity: 0.7,
    whiteSpace: "nowrap"
  };
  if (access === "entitled") {
    return <a href={href}>{children}</a>;
  }
  if (access !== "signed-in") {
    return <span>
        <a href={"/login?redirect=" + encodeURIComponent(href)}>{children}</a>
        <span style={muted}> (sign in: {note})</span>
      </span>;
  }
  return <span>
      {children}
      <span style={muted}> ({note})</span>
    </span>;
};

A [trial](/docs/aspect-workflows/enterprise/evaluation/greening) typically ends in a comparison with your current CI. Measure the same things on your current CI and on the dark-launched job, over the same commits, and agree with your Aspect contact at the start what result counts as a success.

## What to measure

| Metric                                  | Where it comes from                                                                                                                                                                                                                                                                       | Why it matters                                               |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| **Pull request wall time**, p50 and p90 | Your CI provider's job durations                                                                                                                                                                                                                                                          | What developers wait for. p90 is the one they complain about |
| **Queue time**                          | Your CI provider: time from trigger to a job starting                                                                                                                                                                                                                                     | A fast build behind a slow queue is still slow               |
| **Cache hit rate**                      | The [Build Results UI](/docs/aspect-workflows/platform/features/webui), per invocation                                                                                                                                                                                                    | How much work the build skipped                              |
| **CI compute cost**                     | Your CI provider's bill today. Self-hosted: the deployment's <GatedLink access={gatedAccess(user, "workflows-subscriber")} href="/docs/aspect-workflows/enterprise/self-hosted/observability/cost-monitoring" group="workflows-subscriber">cost monitoring</GatedLink> or your cloud bill | Makes the ROI case: what the faster builds cost or save      |

Take the current-CI numbers over a period of ordinary traffic before you start, as [the trial's first step](/docs/aspect-workflows/enterprise/evaluation/greening#1-take-a-baseline) says.

## Comparing fairly

* **Same commits.** The dark-launched job runs on the commits your current CI already builds, so both sides see the same changes.
* **Warm against warm.** The first builds on a new deployment are cold by definition. Compare after the cache and the runners have seen a few days of traffic.
* **Tune before you judge.** Runner sizes, group splits and scaling limits change the numbers. Work through [Optimizing CI runners](/docs/aspect-workflows/enterprise/guides/optimizing-ci-runners) and [Optimizing your Bazel build](/docs/bazel/guides/optimizing-builds) before you take the final measurement.
* **Count what you excluded.** Tests you tagged out to get green aren't in the comparison. Say how many there are, and what it would take to bring them back.
