Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9345715
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
View Options
diff --git a/bin/db-git-repo-meta.sh b/bin/db-git-repo-meta.sh
index 754e062..eb7a8cb 100755
--- a/bin/db-git-repo-meta.sh
+++ b/bin/db-git-repo-meta.sh
@@ -1,28 +1,30 @@
#!/usr/bin/env bash
# Use: $0 <DB-name>
# will compute the number of revision, directory, content from db respectively.
DB=$1
count() {
DB=$1
QUERY=$2
psql -d $1 --command "$QUERY;" | tail -3 | head -1
}
NB_CONTENTS=$(count $DB "select count(*) from content;")
NB_DIRECTORIES=$(count $DB "select count(*) from directory;")
-NB_DIRECTORY_ENTRIES=$(count $DB "select count(*) from directory_entry;")
+NB_DIRECTORY_ENTRIES_DIR=$(count $DB "select count(*) from directory_entry_dir;")
+NB_DIRECTORY_ENTRIES_FILE=$(count $DB "select count(*) from directory_entry_file;")
NB_REVISIONS=$(count $DB "select count(*) from revision;")
NB_RELEASES=$(count $DB "select count(*) from release;")
NB_PERSONS=$(count $DB "select count(*) from person;")
cat<<EOF
-content $NB_CONTENTS
-directory $NB_DIRECTORIES
-directory_entries $NB_DIRECTORY_ENTRIES
-revision $NB_REVISIONS
-release $NB_RELEASES
-person $NB_PERSONS
+content $NB_CONTENTS
+directory $NB_DIRECTORIES
+directory_entries_dir $NB_DIRECTORY_ENTRIES_DIR
+directory_entries_file $NB_DIRECTORY_ENTRIES_FILE
+revision $NB_REVISIONS
+release $NB_RELEASES
+person $NB_PERSONS
EOF
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Jul 4, 3:29 PM (1 w, 15 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3253881
Attached To
rDLDG Git loader
Event Timeline
Log In to Comment