Change History (13)
comment:1 by , 8 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 8 years ago
Summary: | Measured times include packaging, when package management is in effect → Measured times and sizes include packaging, when package management is in effect |
---|
comment:3 by , 8 years ago
Milestone: | → 2.4 |
---|
Let's try to do that for 2.4, but if the changes are to painful, we'll revert to 3.0.
comment:4 by , 8 years ago
For SBU, It is easy to output the "Totalseconds: ..." before packing and after install.
For sizes, it is more complicated: right now, the Makefile outputs "KB: ..." before unpacking the tarball, and another "KB: ..." after the script exits. The computation is done in the following way: Required space : KB after - KB before Installed size : KB before next script - KB before this script.
We can of course keep the same protocol for "KB before", and get a value of "KB after" by outputting after install and before packing. Problem is the installed size. The next "KB before" will include both installed size and the size of the package binary (.deb or .tar.gz).
We can get the installed size from "du -sk $PKG_DEST", but then we would have to change the create-SBU_du-report.sh script, depending on whether we use package management or not...
Furthermore, when we later want to include porg style, it'll break again.
comment:5 by , 8 years ago
A possible plan:
- Remove the second "KB: ..." generation from Makefile.
- generate 2 "KB: ..." during the script, one before install, and one after. We would have 3 "KB: ..." values (KB1, KB2, KB3) and we can compute:
- Required size = KB3 -KB1
- Installed size = KB3 -KB2
Let's try that...
comment:6 by , 8 years ago
But now, we would change "create-sbu_du-report.sh to account for those 3 values. This means it will not work anymore for CLFS... Or we have to change CLFS too. Well it's just a few lines more in clfs.xsl. It is maybe a big change for a "rc" time, but let's try...
follow-up: 8 comment:7 by , 8 years ago
Problem is with packages, which do things after install: tests for systemd and dejagnu, and locales in glibc (actually, I'm not sure how those should be counted, since the user may choose to not install them or to install all, or to install one more for her(his) own locale). Anyway, those things occur after the binary package has been saved to its repo, so all size calculation will include the size of the binary package, unless we exclude /var/lib/packages from the du command. But wait, what about the timings?
Wouldn't it be possible to packInstall after the "adjust"/"test" phase? I'd say it's the way to go.
comment:8 by , 8 years ago
Replying to pierre:
Problem is with packages, which do things after install: tests for systemd and dejagnu, and locales in glibc (actually, I'm not sure how those should be counted, since the user may choose to not install them or to install all, or to install one more for her(his) own locale). Anyway, those things occur after the binary package has been saved to its repo, so all size calculation will include the size of the binary package, unless we exclude /var/lib/packages from the du command. But wait, what about the timings?
Wouldn't it be possible to packInstall after the "adjust"/"test" phase? I'd say it's the way to go.
No, it is just stupid: those phases need an installed package...
comment:9 by , 8 years ago
OK, I cannot think of a "minimal" way of doing this. I'll move the milestone to 3.0, and document that figures are wrong when using package management. Hmm, maybe a more radical way: make package management incompatible with SBU report in Config.in!
comment:10 by , 8 years ago
Milestone: | 2.4 → 3.0 |
---|
comment:11 by , 8 years ago
comment:12 by , 7 years ago
4 months later, had some time to think a little more:
- for SBUs: From man bash about the SECONDS variable:
Each time this parameter is referenced, the number of seconds since shell invocation is returned. If a value is assigned to SECONDS, the value returned upon subsequent references is the number of seconds since the assignment plus the value assigned.
so it is possible to have something like:PREV_SEC=$SECONDS PackInstall SECONDS=$PREV_SEC
and the packing time is not counted.
- for Sizes: just exclude /var/lib from du commands
comment:13 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Timings and sizes are the same with anf without package management now. Fixed at r3976 in trunk and r3975 in 2.4 branch.
This is not a small change, because right now, the total size of the system is measured before launching the scriptlet, and after it has exited. For times, it is slightly easier, because the command to report the time is included in the scriptlet.