diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-01-28 10:14:44 +0100 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-01-29 11:10:34 +0000 |
| commit | 323c196b555b718b5bbd19fff0cc82947aa77431 (patch) | |
| tree | c771c5452acc9c963c3d0b9d92bc0feeb58bc6e3 /pkg | |
| parent | 31165dea2b2f4d284667ecf29d84eb8e1394449e (diff) | |
pkg/coveragedb: add functions table
Session aggregates information about multiple builds.
The source code may have a few function definitions per file.
In case of multiple function definitions we want to see sum(func1 + func2).
Instead of [line_from, line_to] it is better to store the specific list of lines signaled func coverage.
Diffstat (limited to 'pkg')
| -rwxr-xr-x | pkg/coveragedb/init_db.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg/coveragedb/init_db.sh b/pkg/coveragedb/init_db.sh index ddf231f98..ef82f35b2 100755 --- a/pkg/coveragedb/init_db.sh +++ b/pkg/coveragedb/init_db.sh @@ -25,6 +25,22 @@ CREATE TABLE gcloud spanner databases ddl update $db --instance=syzbot --project=syzkaller \ --ddl="$create_table" +echo "drop table 'functions' if exists" +gcloud spanner databases ddl update $db --instance=syzbot --project=syzkaller \ +--ddl="DROP TABLE IF EXISTS functions" +echo "create table 'functions'" +create_table=$( echo -n ' +CREATE TABLE + functions ( + "session" text, + "filepath" text, + "function" text, + "lines" bigint[], + PRIMARY KEY + (session, filepath, function) );') +gcloud spanner databases ddl update $db --instance=syzbot --project=syzkaller \ + --ddl="$create_table" + echo "drop table 'merge_history' if exists" gcloud spanner databases ddl update $db --instance=syzbot --project=syzkaller \ --ddl="DROP TABLE IF EXISTS merge_history" |
