| Nick Landsberg 2004-09-07, 3:57 am |
| David Lightstone wrote:
> "Phlip" <phlip_cpp@yahoo.com> wrote in message
> news:nx__c.1366$Q4.822@newssvr15.news.prodigy.com...
>=20
[color=darkred]
>=20
> www.testingcenter.com
>=20
>=20
>=20
>=20
> Nice troll, Phlip. Now id only someone will take the bait.
>=20
>=20
Let me take the bait, because I don't really understand
this particular aspect of TDD ...
Background: I'm the "performance guy" on a lot of
projects. Performance can mean "delay" (in the case
of user-PC's) or it can mean throughput (in the case
of servers).
As I understand TDD, you develop a test to show that
"it" does not work, then you write some code to now show
that "it" does work. Repeat until the whole ball of wax
works. (Simplification, I agree, but that's what I've
heard in this forum).
As the "performance guy" on many projects, I dole out
"budgets" for the server side. These are typically of
the form of "you have about 500 microseconds of CPU time to
perform this function, and you may not use more than
4 disk I/O's to do it." (That's for real folks,
and it's based on requirements and simple arithmetic.)
Now, could someone please explain to me where
I don't understand how TDD applies to
the following scenario:
Developer A writes a test for a function as per
TDD. It fails the functionality test (as it should=A1)
but passes the performance test, because it
took less than a nanosecond to fail. (Yes,
I can measure that. Run it 100,000+ times
and see the CPU usage.)
As more and more "features" are added to the
test rig, the function takes more and more
time. Assuming the developer actually measured
the server-side performance, at some point it
will likely exceed the budget which was provided
for it. (500 microseconds and/or 4 disk I/O's,
and if you haven't been exposed to that kind of
requirement, then, welcome to the world of
pseudo-real-time systems.)
What do you do now?
This is not a flame. It is a serious question.
(General platitudes will not be accepted as
serious arguments. e.g. "get a faster processor"
is a platitude.)
NPL
--=20
"It is impossible to make anything foolproof
because fools are so ingenious"
- A. Bloch
|