Permalink
Browse files

Add the pyc-bytes metric to the release index.

Reorganize the other metrics/line counts.
  • Loading branch information...
Andy Chu
Andy Chu committed Feb 26, 2018
1 parent 49b63ef commit 50cfbb50cf5ba2574cbb0df89a8288be03b3ecfa
Showing with 41 additions and 29 deletions.
  1. +1 −1 build/actions.sh
  2. +1 −1 build/metrics.sh
  3. +22 −7 doc/release-index.md
  4. +17 −20 scripts/release.sh
View
@@ -95,7 +95,7 @@ pyc-version-manifest() {
# Just show a string like "bytecode-opy.zip" for now. There is no OPy
# version yet.
local filename=$(basename $manifest_path)
local user_str=${filename%-manifest.txt}
local user_str=${filename%-manifest.txt}.zip
local dir=$(dirname $manifest_path)
echo $user_str > $dir/pyc-version.txt
View
@@ -30,7 +30,7 @@ linecount-pydeps() {
}
# Print table of [num_bytes pyc path]
pyc-size() {
pyc-bytes() {
local app_name=${1:-oil}
awk '/\.pyc$/ { print $1 }' _build/$app_name/bytecode-cpython-manifest.txt |
View
@@ -22,6 +22,24 @@ Oil Version 0.5.alpha1
- [Github Wiki for oilshell/oil](https://github.com/oilshell/oil/wiki)
### Metrics
- Count lines of source code in different ways:
- [oil-osh-cloc](metrics.wwz/line-counts/oil-osh-cloc.txt). The core of Oil,
as measured by the [cloc][] tool.
- [src](metrics.wwz/line-counts/src.txt). The whole Oil repo organized by
type of source file.
- [parser](metrics.wwz/line-counts/parser.txt). How big is the parser?
- [runtime](metrics.wwz/line-counts/runtime.txt). How big is the runtime?
- Count lines of dependencies:
- [pydeps](metrics.wwz/line-counts/pydeps.txt). Oil code plus the Python
standard library.
- [nativedeps](metrics.wwz/line-counts/nativedeps.txt). Oil code plus A
slice of CPython.
- [Bytecode Size](metrics.wwz/pyc-bytes.txt)
[cloc]: https://github.com/AlDanial/cloc
### Tests Results
- [Spec Tests](test/spec.wwz/). Test OSH behavior against that of existing
@@ -34,7 +52,7 @@ Oil Version 0.5.alpha1
- [osh2oil Tests](test/osh2oil.wwz/log.txt). Test the conversion of OSH to
Oil.
### Benchmarks and Metrics
### Benchmarks
- [OSH Parser Performance](benchmarks.wwz/osh-parser/). How fast does OSH
parse compared to other shells?
@@ -43,13 +61,10 @@ Oil Version 0.5.alpha1
- [Virtual Memory Baseline](benchmarks.wwz/vm-baseline/). How much memory to
shells use at startup?
- [OHeap](benchmarks.wwz/oheap/). Metrics for a possible AST encoding format.
- [Line Counts](metrics/line-counts.wwz/). How much code is in Oil?
- [OVM Build](benchmarks.wwz/ovm-build/). How long does it take for end users
to build Oil? How big is the resulting binary?
<!-- TODO:
benchmarks/
virtual-memory/
src/ annotated/cross-referenced source code
/src/ annotated/cross-referenced source code
coverage/ code coverage in Python and C
metrics/ line-counts, debug info size?
-->
View
@@ -12,7 +12,7 @@
# prereq: benchmarks/osh-runtime.sh {download,extract}
# benchmarks/oheap.sh measure
# benchmarks/report.sh all
# $0 line-counts
# $0 metrics
# $0 build-tree
# $0 compress
# $0 git-changelog-$VERSION
@@ -60,12 +60,12 @@ log() {
# tarball/ # log of building and running the tarball?
# asan/ # spec tests or other?
# # or it can be put under test/{spec,wild}
# metrics/ # static metrics on source code?
# # could also do cloc?
# line-counts.wwz/
# metrics.wwz/ # static metrics on source code?
# line-counts/
# nativedeps.txt (build/stats.sh line counts)
# bytecode size, number of PyCodeObject
# number of functions, classes, etc.?
# bytecode/bundle size, binary size on x86_64
# bytecode/bundle size (binary size on x86_64 is in ovm-build.sh)
# tarball size?
# coverage/ # coverage of all spec tests? And gold tests maybe?
# python/ # python stdlib coverage with pycoverage
@@ -397,9 +397,9 @@ compress() {
time zip -r -q $out . # recursive, quiet
popd
log "--- metrics/line-counts"
local out="$root/metrics/line-counts.wwz"
pushd _tmp/metrics/line-counts
log "--- metrics"
local out="$root/metrics.wwz"
pushd _tmp/metrics
time zip -r -q $out . # recursive, quiet
popd
@@ -430,18 +430,8 @@ compress-benchmarks() {
popd
}
metrics-index() {
local dir=$1
scripts/html.sh basic-head "Line Counts"
echo '<p>'
find $dir -name '*.txt' -a -printf '<a href="%P">%P</a> <br/>\n'
echo '</p>'
scripts/html.sh basic-tail "Line Counts"
}
line-counts() {
local out=_tmp/metrics/line-counts
local out=$1
mkdir -p $out
# Counting directly from the build.
@@ -456,8 +446,15 @@ line-counts() {
scripts/count.sh runtime > $out/runtime.txt
scripts/count.sh oil-osh-cloc > $out/oil-osh-cloc.txt
}
metrics() {
local out=_tmp/metrics
build/metrics.sh pyc-bytes > $out/pyc-bytes.txt
line-counts $out/line-counts
metrics-index $out > $out/index.html
tree $out
}

0 comments on commit 50cfbb5

Please sign in to comment.