Age a bit slower.

This commit is contained in:
rupa committed 2014-08-31 13:24:36 -04:00
1 parent f0a71cae87
commit b620b0a8af
3 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -70,8 +70,8 @@ NOTES
Aging:
The rank of directories maintained by z undergoes aging based on a sim-
ple formula. The rank of each entry is incremented every time it is
accessed. When the sum of ranks is greater than 6000, all ranks are
multiplied by 0.99. Entries with a rank lower than 1 are forgotten.
accessed. When the sum of ranks is over 9000, all ranks are multiplied
by 0.99. Entries with a rank lower than 1 are forgotten.
Frecency:
Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted
+2 -2
View File
@@ -96,8 +96,8 @@ Install the provided man page \fBz.1\fR somewhere like \fB/usr/local/man/man1\fR
Aging:
The rank of directories maintained by \fBz\fR undergoes aging based on a simple
formula. The rank of each entry is incremented every time it is accessed. When
the sum of ranks is greater than 6000, all ranks are multiplied by 0.99. Entries
with a rank lower than 1 are forgotten.
the sum of ranks is over 9000, all ranks are multiplied by 0.99. Entries with a
rank lower than 1 are forgotten.
.SS
Frecency:
Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted rank
+1 -1
View File
@@ -69,7 +69,7 @@ _z() {
count += $2
}
END {
if( count > 6000 ) {
if( count > 9000 ) {
# aging
for( x in rank ) print x "|" 0.99*rank[x] "|" time[x]
} else for( x in rank ) print x "|" rank[x] "|" time[x]