持续集成的投资回报率是多少?
目前,我们的组织没有实行持续集成。
为了让我们启动并运行 CI 服务器,我需要生成一份文档来证明投资回报。
除了通过尽早发现和修复错误来节省成本之外,我很好奇我可以将其写入本文档的其他好处/节省。
Currently, our organization does not practice Continuous Integration.
In order for us to get an CI server up and running, I will need to produce a document demonstrating the return on the investment.
Aside from cost savings by finding and fixing bugs early, I'm curious about other benefits/savings that I could stick into this document.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
我喜欢 CI 的第一个原因是它有助于防止开发人员检查损坏的代码,这有时会削弱整个团队。想象一下,如果我在出发度假之前进行一次涉及某些数据库架构更改的重大签入。当然,在我的开发盒上一切正常,但我忘记签入数据库模式更改脚本,这可能很重要,也可能不那么简单。好吧,现在存在涉及数据库中新/更改字段的复杂更改,但第二天在办公室的人实际上没有人拥有该新架构,因此现在整个团队都陷入困境,而有人正在考虑重现您已经完成的工作,并且只是忘了签入。
是的,我使用了一个特别令人讨厌的数据库更改示例,但它实际上可以是任何东西。也许使用某些电子邮件代码进行部分签入会导致您的所有开发人员向您的实际最终用户发送垃圾邮件?你能想到的......
所以在我看来,避免其中一种情况将使这种努力的投资回报率很快得到回报。
My #1 reason for liking CI is that it helps prevent developers from checking in broken code which can sometimes cripple an entire team. Imagine if I make a significant check-in involving some db schema changes right before I leave for vacation. Sure, everything works fine on my dev box, but I forget to check-in the db schema changescript which may or may not be trivial. Well, now there are complex changes referring to new/changed fields in the database but nobody who is in the office the next day actually has that new schema, so now the entire team is down while somebody looks into reproducing the work you already did and just forgot to check in.
And yes, I used a particularly nasty example with db changes but it could be anything, really. Perhaps a partial check-in with some emailing code that then causes all of your devs to spam your actual end-users? You name it...
So in my opinion, avoiding a single one of these situations will make the ROI of such an endeavor pay off VERY quickly.
如果您与标准项目经理交谈,他们可能会发现从简单的投资回报率角度来看,持续集成有点难以理解:对于给定的美元投资,他们将获得什么物理产品并不是立即显而易见的。
我是这样解释的:“持续集成消除了项目中的所有风险。”
风险管理对于项目经理来说是一个真正的问题,超出了软件工程类型的正常范围他们花更多的时间编写代码而不是担心钱如何花掉。与这类人有效合作的一部分是学习用他们可以理解的方式表达我们所知道的好事。
以下是我在此类对话中提出的一些风险。请注意,对于明智的项目经理,我已经在第一点之后赢得了争论:
If you're talking to a standard program manager, they may find continuous integration to be a little hard to understand in terms of simple ROI: it's not immediately obvious what physical product that they'll get in exchange for a given dollar investment.
Here's how I've learned to explain it: "Continuous Integration eliminates whole classes of risk from your project."
Risk management is a real problem for program managers that is outside the normal ken of software engineering types who spend more time writing code than worrying about how the dollars get spent. Part of working with these sorts of people effectively is learning to express what we know to be a good thing in terms that they can understand.
Here are some of the risks that I trot out in conversations like these. Note, with sensible program managers, I've already won the argument after the first point:
CI 协助发现问题。测量当前发现损坏的构建或代码中的主要错误所需的时间。将其乘以每个开发人员在该时间范围内使用该代码给公司带来的成本。将其乘以一年中发生破损的次数。
这是你的电话号码。
CI assists with issue discovery. Measure the amount of time currently that it takes to discover broken builds or major bugs in the code. Multiply that by the cost to the company for each developer using that code during that time frame. Multiply that by the number of times breakages occur during the year.
There's your number.
每个成功的构建都是候选版本 - 因此您可以更快地提供更新和错误修复。
如果构建过程的一部分生成安装程序,这也可以实现快速部署周期。
Every successful build is a release candidate - so you can deliver updates and bug fixes much faster.
If part of your build process generates an installer, this allows a fast deployment cycle as well.
来自 Wikipedia:
版本)。
他们正在编写的代码的
自动化测试和 CI 生成的复杂代码
复杂性和功能完整)让开发人员专注于开发功能性、高质量的代码,并帮助团队发展
我们使用 CI(每天构建两次),它为我们节省了大量时间可用于测试和发布的工作代码。
从开发人员的角度来看,当自动构建结果通过电子邮件发送给全世界(开发人员、项目经理等)时,CI 可能会令人生畏:
“加载‘XYZ.dll’的 DLL 构建失败。”并且您是 XYZ 先生,他们知道您是谁:)!
From Wikipedia:
versions).
of code they are writing
complex code
complexity, and features complete) focus developers on developing functional, quality code, and help develop momentum in a team
We use CI (Two builds a day) and it saves us a lot of time keeping working code available for test and release.
From a developer point of view CI can be intimidating when Automatic Build Result, sent by email to all the world (developers, project managers, etc. etc.), says:
"Error in loading DLL Build of 'XYZ.dll' failed." and you are Mr. XYZ and they know who you are :)!
这是我自己经验中的例子...
我们的系统有多个平台和配置,有 70 多名工程师在同一代码库上工作。对于不太常用的配置,我们的构建成功率约为 60%,对于最常用的配置,构建成功率为 85%。每天都会有大量关于编译错误或其他故障的电子邮件。
我做了一些粗略的计算,估计我们每个程序员平均每天因糟糕的构建而损失一个小时,总共每天将近 10 个人日的工作时间。这还没有考虑到迭代时间内发生的成本,当程序员因为不知道它是否稳定而拒绝同步到最新代码时,这会让我们付出更多的代价。
部署由 Team City 管理的构建服务器机架后,我们现在看到所有配置的平均成功率为 98%,平均编译错误在系统中停留几分钟而不是几小时,我们的大多数工程师现在都可以轻松地使用最新版本的代码。
一般来说,我想说的是,与部署 CI 之前的三个月相比,项目最后三个月的总体节省时间保守估计约为 6 个人月。这一论点帮助我们获得了资源来扩展我们的构建服务器,并将更多的工程师时间集中在额外的自动化测试上。
Here's my example from my own experiences...
Our system has multiple platforms and configurations with over 70 engineers working on the same code base. We suffered from somewhere around 60% build success for the less commonly used configs and 85% for the most commonly used. There was a constant flood of e-mails on a daily basis about compile errors or other failures.
I did some rough calculations and estimated that we lost an average of an hour a day per programmer to bad builds, which totals nearly 10 man days of work every day. That doesn't factor in the costs that occur in iteration time when programmers refuse to sync to the latest code because they don't know if it's stable, that costs us even more.
After deploying a rack of build servers managed by Team City we now see an average success rate of 98% on all configs, the average compile error stays in the system for minutes not hours and most of our engineers are now comfortable staying at the latest revision of the code.
In general I would say that a conservative estimate on our overall savings was around 6 man months of time over the last three months of the project compared with the three months prior to deploying CI. This argument has helped us secure resources to expand our build servers and focus more engineer time on additional automated testing.
我们最大的收获是始终进行质量检查的夜间构建。在我们的旧系统下,每个产品至少每周一次会在凌晨 2 点发现有人签入了错误代码。这导致 QA 无法进行夜间构建测试,补救措施是向发布工程发送一封电子邮件。他们会诊断问题并联系开发人员。有时,质量检查要花上中午的时间才能真正找到工作。现在,除了每晚都有一个好的安装程序之外,我们实际上每晚都将其安装在所有不同受支持配置的虚拟机上。因此,现在当 QA 介入时,他们可以在几分钟内开始测试。现在,当你想到旧的方法时,QA 进来抓住安装程序,启动所有虚拟机,安装它,然后开始测试。对于每个 QA 人员来说,我们为每个配置的测试节省了大约 15 分钟的 QA 时间。
Our biggest gain, is from always having a nightly build for QA. Under our old system each product, at least once a week, would find out at 2AM that someone had checked in bad code. This caused no nightly build for QA to test with, the remedy was to send release engineering an email. They would diagnose the problem and contact a dev. Sometimes it took as long as noon before QA actually had something to work with. Now, in addition to having a good installer every single night, we actually install it on VM's of all the different supported configurations everynight. So now when QA comes in, they can start testing within a few minutes. Now when you think of the old way, QA came in grabbed the installer, fired up all the vms, installed it, then started testing. We save QA probably 15 minutes per configuration to test on, per QA person.
有免费的 CI 服务器可用,以及免费的构建工具(如 NAnt)。您可以在您的开发盒上实施它以发现其好处。
如果您使用源代码控制和错误跟踪系统,我想始终第一个报告错误(每次签入后几分钟内)将非常引人注目。再加上你自己的错误率的降低,你可能会得到一笔销售。
There are free CI servers available, and free build tools like NAnt. You can implement it on your dev box to discover the benefits.
If you're using source control, and a bug-tracking system, I imagine that consistently being the first to report bugs (within minutes after every check-in) will be pretty compelling. Add to that the decrease in your own bug-rate, and you'll probably have a sale.
投资回报率实际上是提供客户想要的东西的能力。这当然是非常主观的,但是当在最终客户的参与下实施时,您会发现客户开始欣赏他们所得到的东西,因此您在用户接受期间往往会看到更少的问题。
预期结果。
所以它有助于更快地失败,这有助于更早地降低风险。
The ROI is really an ability to provide what the customer wants. This is of course very subjective but when implemented with involvement of the end customer, you would see that customers starts appreciating what they are getting and hence you tend to see less issues during User Acceptance.
expected result.
So it helps in failing faster, which helps mitigate risks earlier.