Skip to content

Cycle time

B. K. Oxley (binkley) edited this page Apr 16, 2024 · 39 revisions

Cycle time

An important concept for writing programs is cycle time. This is how long it takes from having an idea until users see benefits. There are other definitions that break up this general concept into specific portions of development.

Each project should develop their own notion of cycle time(s)! This is a great discussion with others on "ways of working":

  • What do we measure during development?
  • Who is interested in improving these measurements?
  • Who benefits from going faster?
  • Do benefits depend on particular kinds of work? (documentation, deployments, new features, managing projects, etc)
  • Are folks on project happy? Do they like the pace of improving the project? (No one finds slow work fun. I wanted to say "slow work is unfun", but maybe it should be anti-fun, the enemy of enjoying your work.)

For this project, I'm focused on: How long from when programmers start work until it is ready to deploy from CI. So discussion is not about:

  • Time from forming a new idea until turning it into work you can start
  • Time from a deployable CI build until when users see your changes
  • Time for management to track different kinds of work

This is my focus because I am focused on your build pipeline. You should have awesome build pipelines that make you happy! The above "not" list is important, and worth your effort, but not what I'm writing about.

In pictures

Here might be a picture of Cycle Time end-to-end:

flowchart TB

idea("Idea for improvement")
card("Turn idea into work")
process("Discussion and moving work to "ready"")
dev("Programmers pick up work")
progress("Programmers turn work into reality")
push("Work goes to CI pipeline")
ci("CI pipeline builds work")
ready("Work ready to deploy")
deploy("Work goes into production")
users("Users benefit from work")

subgraph idea_steps [Idea]
  idea-->card
  card-->process
end

subgraph work_steps [Work]
  process-->dev
  dev-->progress
  progress-->push
  push-->ci
  ci-->ready
end

subgraph deploy_steps [Users]
  ready-->deploy
  deploy-->users
  users-->idea
end
Loading

And here is a more focused picture:

flowchart TB

red("Work on programming")
green("Local tests pass -- unit, et al")
refactor("Improve and clean up code")

coverage("Local coverage passes")
local_checks("Local checks pass")
push("Push to shared CI")

pushed("New changes in CI")
ci("Run full build")
ci_checks("Same checks as local plus CI-specific ones")
ready("Result ready to deploy")

subgraph local_steps [Red-green-refactor]
  red-->green
  green->refactor
  refactor-->red
end

subgraph push_steps [Push to CI]
  green-->coverage
  coverage-->local_checks
  local_checks-->push
  push-->pushed
end

subgraph ci_steps [CI]
  pushed-->ci
  ci-->ci_checks
  ci_checks-->ready
end
Loading
Clone this wiki locally