]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/DelaySpec.cc
3 * $Id: DelaySpec.cc,v 1.4 2006/04/18 12:46:10 robertc Exp $
5 * DEBUG: section 77 Delay Pools
6 * AUTHOR: Robert Collins <robertc@squid-cache.org>
7 * Based upon original delay pools code by
8 * David Luyer <david@luyer.net>
10 * SQUID Web Proxy Cache http://www.squid-cache.org/
11 * ----------------------------------------------------------
13 * Squid is the result of efforts by numerous individuals from
14 * the Internet community; see the CONTRIBUTORS file for full
15 * details. Many organizations have provided support for Squid's
16 * development; see the SPONSORS file for full details. Squid is
17 * Copyrighted (C) 2001 by the Regents of the University of
18 * California; see the COPYRIGHT file for full details. Squid
19 * incorporates software developed and/or copyrighted by other
20 * sources; see the CREDITS file for full details.
22 * This program is free software; you can redistribute it and/or modify
23 * it under the terms of the GNU General Public License as published by
24 * the Free Software Foundation; either version 2 of the License, or
25 * (at your option) any later version.
27 * This program is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU General Public License for more details.
32 * You should have received a copy of the GNU General Public License
33 * along with this program; if not, write to the Free Software
34 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
37 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
44 #include "DelaySpec.h"
48 DelaySpec::DelaySpec() : restore_bps(-1), max_bytes (-1)
52 DelaySpec::stats (StoreEntry
* sentry
, char const *label
) const
54 if (restore_bps
== -1) {
55 storeAppendPrintf(sentry
, "\t%s:\n\t\tDisabled.\n\n", label
);
59 storeAppendPrintf(sentry
, "\t%s:\n", label
);
60 storeAppendPrintf(sentry
, "\t\tMax: %d\n", max_bytes
);
61 storeAppendPrintf(sentry
, "\t\tRestore: %d\n", restore_bps
);
65 DelaySpec::dump (StoreEntry
*entry
) const
67 storeAppendPrintf(entry
, " %d/%d", restore_bps
, max_bytes
);
75 token
= strtok(NULL
, "/");
80 if (sscanf(token
, "%d", &i
) != 1)