summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:14 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:14 +0000
commita7e66b170369fe1e1e7fdd2c3abd8c85e9b15bf9 (patch)
treefda7a79eebc9f315294d310693d00b4d32368053 /apt-pkg
parentb0b4efb96c3fad90bf978d61b230501bcdadff3d (diff)
More cache usage counters
Author: jgg Date: 1998-12-14 03:39:15 GMT More cache usage counters
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/pkgcache.cc4
-rw-r--r--apt-pkg/pkgcache.h4
-rw-r--r--apt-pkg/pkgcachegen.cc5
3 files changed, 10 insertions, 3 deletions
diff --git a/apt-pkg/pkgcache.cc b/apt-pkg/pkgcache.cc
index 3e01e771d..ac1de021a 100644
--- a/apt-pkg/pkgcache.cc
+++ b/apt-pkg/pkgcache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.cc,v 1.20 1998/12/07 07:26:19 jgg Exp $
+// $Id: pkgcache.cc,v 1.21 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Package Cache - Accessor code for the cache
@@ -59,6 +59,8 @@ pkgCache::Header::Header()
VersionCount = 0;
DependsCount = 0;
PackageFileCount = 0;
+ VerFileCount = 0;
+ ProvidesCount = 0;
MaxVerFileSize = 0;
FileList = 0;
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index 56ab50a37..f959f4233 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcache.h,v 1.13 1998/12/14 02:23:46 jgg Exp $
+// $Id: pkgcache.h,v 1.14 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Cache - Structure definitions for the cache file
@@ -153,6 +153,8 @@ struct pkgCache::Header
unsigned long VersionCount;
unsigned long DependsCount;
unsigned long PackageFileCount;
+ unsigned long VerFileCount;
+ unsigned long ProvidesCount;
// Offsets
__apt_ptrloc FileList; // struct PackageFile
diff --git a/apt-pkg/pkgcachegen.cc b/apt-pkg/pkgcachegen.cc
index 58561bf35..7cf332b68 100644
--- a/apt-pkg/pkgcachegen.cc
+++ b/apt-pkg/pkgcachegen.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgcachegen.cc,v 1.25 1998/12/14 02:23:47 jgg Exp $
+// $Id: pkgcachegen.cc,v 1.26 1998/12/14 03:39:15 jgg Exp $
/* ######################################################################
Package Cache Generator - Generator for the cache structure.
@@ -188,6 +188,8 @@ bool pkgCacheGenerator::NewFileVer(pkgCache::VerIterator &Ver,
VF->Size = List.Size();
if (Cache.HeaderP->MaxVerFileSize < VF->Size)
Cache.HeaderP->MaxVerFileSize = VF->Size;
+ Cache.HeaderP->VerFileCount++;
+
return true;
}
/*}}}*/
@@ -295,6 +297,7 @@ bool pkgCacheGenerator::ListParser::NewProvides(pkgCache::VerIterator Ver,
unsigned long Provides = Owner->Map.Allocate(sizeof(pkgCache::Provides));
if (Provides == 0)
return false;
+ Cache.HeaderP->ProvidesCount++;
// Fill it in
pkgCache::PrvIterator Prv(Cache,Cache.ProvideP + Provides,Cache.PkgP);