Mailinglist Archive: zypp-commit (266 mails)

< Previous Next >
[zypp-commit] r11570 - in /trunk/sat-solver: src/pool.c src/repo_solv.c src/solver.c tools/repo_rpmdb.c tools/repo_rpmmd.c
  • From: mlschroe@xxxxxxxxxxxxxxxx
  • Date: Tue, 04 Nov 2008 13:32:05 -0000
  • Message-id: <20081104133206.1577A27EF3@xxxxxxxxxxxxxxxx>
Author: mlschroe
Date: Tue Nov 4 14:32:05 2008
New Revision: 11570

URL: http://svn.opensuse.org/viewcvs/zypp?rev=11570&view=rev
Log:
- log more statistics

Modified:
trunk/sat-solver/src/pool.c
trunk/sat-solver/src/repo_solv.c
trunk/sat-solver/src/solver.c
trunk/sat-solver/tools/repo_rpmdb.c
trunk/sat-solver/tools/repo_rpmmd.c

Modified: trunk/sat-solver/src/pool.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/pool.c?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- trunk/sat-solver/src/pool.c (original)
+++ trunk/sat-solver/src/pool.c Tue Nov 4 14:32:05 2008
@@ -356,6 +356,7 @@
pool->whatprovidesdataoff = off;
pool->whatprovidesdataleft = extra;
pool_shrink_whatprovides(pool);
+ POOL_DEBUG(SAT_DEBUG_STATS, "whatprovides memory used: %d K id array, %d K
data\n", (pool->ss.nstrings + pool->nrels + WHATPROVIDES_BLOCK) /
(1024/sizeof(Id)), (pool->whatprovidesdataoff + pool->whatprovidesdataleft) /
(1024/sizeof(Id)));
POOL_DEBUG(SAT_DEBUG_STATS, "createwhatprovides took %d ms\n",
sat_timems(now));
}


Modified: trunk/sat-solver/src/repo_solv.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/repo_solv.c?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- trunk/sat-solver/src/repo_solv.c (original)
+++ trunk/sat-solver/src/repo_solv.c Tue Nov 4 14:32:05 2008
@@ -537,11 +537,14 @@
Id stack[3 * 5];
int keydepth;
int needchunk; /* need a new chunk of data */
+ unsigned int now;

struct _Stringpool *spool;

Repodata data;

+ now = sat_timems(0);
+
memset(&data, 0, sizeof(data));
data.repo = repo;
data.fp = fp;
@@ -1363,6 +1366,10 @@
memset(&stubdata, 0, sizeof(stubdata));
repodata_search(&data, SOLVID_META, REPOSITORY_EXTERNAL,
SEARCH_ARRAYSENTINEL, create_stub_cb, &stubdata);
}
+
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_solv took %d ms\n", sat_timems(now));
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n",
data.incoredatalen/1024, repo->idarraysize / (1024/sizeof(Id)));
return 0;
}


Modified: trunk/sat-solver/src/solver.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/src/solver.c?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- trunk/sat-solver/src/solver.c (original)
+++ trunk/sat-solver/src/solver.c Tue Nov 4 14:32:05 2008
@@ -4078,6 +4078,7 @@
solv->rpmrules_end = solv->nrules; /* mark end of rpm rules */

solv->directdecisions = solv->decisionq.count;
+ POOL_DEBUG(SAT_DEBUG_STATS, "rpm rule memory usage: %d K\n", solv->nrules *
sizeof(Rule) / 1024);
POOL_DEBUG(SAT_DEBUG_STATS, "decisions so far: %d\n", solv->decisionq.count);
POOL_DEBUG(SAT_DEBUG_STATS, "rpm rule creation took %d ms\n",
sat_timems(now));


Modified: trunk/sat-solver/tools/repo_rpmdb.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_rpmdb.c?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_rpmdb.c (original)
+++ trunk/sat-solver/tools/repo_rpmdb.c Tue Nov 4 14:32:05 2008
@@ -1251,13 +1251,14 @@
Id oldcookietype = 0;
Repodata *data;
int count = 0, done = 0;
+ unsigned int now;

+ now = sat_timems(0);
memset(&dbkey, 0, sizeof(dbkey));
memset(&dbdata, 0, sizeof(dbdata));

if (!rootdir)
rootdir = "";
-

if (!(flags & REPO_REUSE_REPODATA))
data = repo_add_repodata(repo, 0);
@@ -1611,15 +1612,18 @@
sat_free(rpmids);
}
}
- if (!(flags & REPO_NO_INTERNALIZE))
- repodata_internalize(data);
- if (rpmhead)
- sat_free(rpmhead);
if (db)
db->close(db, 0);
dbenv->close(dbenv, 0);
+ if (rpmhead)
+ sat_free(rpmhead);
+ if (!(flags & REPO_NO_INTERNALIZE))
+ repodata_internalize(data);
if ((flags & RPMDB_REPORT_PROGRESS) != 0)
pool_debug(pool, SAT_ERROR, "%%%% 100\n");
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_rpmdb took %d ms\n", sat_timems(now));
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n",
data->incoredatalen/1024, repo->idarraysize / (1024/sizeof(Id)));
}



Modified: trunk/sat-solver/tools/repo_rpmmd.c
URL:
http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/tools/repo_rpmmd.c?rev=11570&r1=11569&r2=11570&view=diff
==============================================================================
--- trunk/sat-solver/tools/repo_rpmmd.c (original)
+++ trunk/sat-solver/tools/repo_rpmmd.c Tue Nov 4 14:32:05 2008
@@ -1092,7 +1092,9 @@
int i, l;
struct stateswitch *sw;
Repodata *data;
+ unsigned int now;

+ now = sat_timems(0);
if (!(flags & REPO_REUSE_REPODATA))
data = repo_add_repodata(repo, 0);
else
@@ -1146,4 +1148,7 @@
sat_free(pd.cscache);
if (!(flags & REPO_NO_INTERNALIZE))
repodata_internalize(data);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo_add_rpmmd took %d ms\n", sat_timems(now));
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo size: %d solvables\n", repo->nsolvables);
+ POOL_DEBUG(SAT_DEBUG_STATS, "repo memory used: %d K incore, %d K idarray\n",
data->incoredatalen/1024, repo->idarraysize / (1024/sizeof(Id)));
}

--
To unsubscribe, e-mail: zypp-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages