Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 May 2001 10:37:11 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        dave <dleimbac@earthlink.net>, freebsd-questions@FreeBSD.ORG, arch@FreeBSD.ORG
Subject:   Re: Gettimeofday Again...
Message-ID:  <200105151737.f4FHbBL55271@earth.backplane.com>
References:  <200105150337.UAA19677@gull.mail.pas.earthlink.net> <200105150346.f4F3kLE45720@earth.backplane.com> <3B00EF40.A1232B75@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
:I have an application where gettimeofday() was a significant
:fraction of the overhead; it was being used to provide for
:marketing eye-candy... basically, squid-compatible proxy
:logging that could be processed using common eye-candy tools
:normally used against squid logs for transaction in, time
:sent to back end, time data came from back end, and time data
:sent to client.
:
:The gettimeofday() calls were _the_ major useless overhead,
:until I eliminated them by creating a zero system call version

    Terry, to be blunt... if you need performance you don't go making
    superfluous system calls for every transaction.  If you want marketing
    eye candy, all you need to do is a statistical measurement... do fine
    measurement of 10% of the transactions rather then fine measurement
    of 100% of the transaction, and you are done.

    Also, using gettimeofday() is a ridiculous way to measure fine grained
    time billions of times in production code.  I mean, sure, it works...
    but getitimer() is about 5 times faster.

						-Matt

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200105151737.f4FHbBL55271>