JS: add extraction metrics to the dbscheme

This commit is contained in:
Esben Sparre Andreasen
2019-09-03 10:36:38 +02:00
parent 27e36cfe05
commit 7fcde4c130
5 changed files with 2788 additions and 0 deletions

View File

@@ -1136,3 +1136,32 @@ configLocations(
); );
@configLocatable = @config | @configName | @configValue; @configLocatable = @config | @configName | @configValue;
/**
* The time taken for the extraction of a file.
* This table contains non-deternistic content.
*
* The sum of the `time` column for each (`file`, `timerKind`) pair
* is the total time taken for extraction of `file`. The `extractionPhase`
* column provides a granular view of the extraction time of the file.
*/
extraction_time(
int file : @file ref,
// see `com.semmle.js.extractor.ExtractionMetrics.ExtractionPhase`.
int extractionPhase: int ref,
// 0 for the elapsed CPU time in nanoseconds, 1 for the wall elapsed wallclock time in nanoseconds
int timerKind: int ref,
float time: float ref
)
/**
* Non-timing related data for the extraction of a single file.
* This table contains non-deternistic content.
*/
extraction_data(
int file : @file ref,
// the absolute path to the cache file
varchar(900) cacheFile: string ref,
boolean fromCache: boolean ref,
int length: int ref
)

View File

@@ -30782,5 +30782,457 @@
</dep> </dep>
</dependencies> </dependencies>
</relation> </relation>
<relation>
<name>extraction_time</name>
<cardinality>378</cardinality>
<columnsizes>
<e>
<k>file</k>
<v>21</v>
</e>
<e>
<k>extractionPhase</k>
<v>9</v>
</e>
<e>
<k>timerKind</k>
<v>2</v>
</e>
<e>
<k>time</k>
<v>43</v>
</e>
</columnsizes>
<dependencies>
<dep>
<src>file</src>
<trg>extractionPhase</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>9</a>
<b>10</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>file</src>
<trg>timerKind</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>2</a>
<b>3</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>file</src>
<trg>time</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>3</a>
<b>4</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>extractionPhase</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>21</a>
<b>22</b>
<v>9</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>extractionPhase</src>
<trg>timerKind</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>2</a>
<b>3</b>
<v>9</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>extractionPhase</src>
<trg>time</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>8</v>
</b>
<b>
<a>42</a>
<b>43</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>timerKind</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>21</a>
<b>22</b>
<v>2</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>timerKind</src>
<trg>extractionPhase</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>9</a>
<b>10</b>
<v>2</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>timerKind</src>
<trg>time</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>22</a>
<b>23</b>
<v>2</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>time</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>42</v>
</b>
<b>
<a>21</a>
<b>22</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>time</src>
<trg>extractionPhase</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>42</v>
</b>
<b>
<a>8</a>
<b>9</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>time</src>
<trg>timerKind</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>42</v>
</b>
<b>
<a>2</a>
<b>3</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
</dependencies>
</relation>
<relation>
<name>extraction_data</name>
<cardinality>21</cardinality>
<columnsizes>
<e>
<k>file</k>
<v>21</v>
</e>
<e>
<k>cacheFile</k>
<v>21</v>
</e>
<e>
<k>fromCache</k>
<v>1</v>
</e>
<e>
<k>length</k>
<v>21</v>
</e>
</columnsizes>
<dependencies>
<dep>
<src>file</src>
<trg>cacheFile</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>file</src>
<trg>fromCache</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>file</src>
<trg>length</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>cacheFile</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>cacheFile</src>
<trg>fromCache</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>cacheFile</src>
<trg>length</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>fromCache</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>21</a>
<b>22</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>fromCache</src>
<trg>cacheFile</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>21</a>
<b>22</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>fromCache</src>
<trg>length</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>21</a>
<b>22</b>
<v>1</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>length</src>
<trg>file</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>length</src>
<trg>cacheFile</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
<dep>
<src>length</src>
<trg>fromCache</trg>
<val>
<hist>
<budget>12</budget>
<bs>
<b>
<a>1</a>
<b>2</b>
<v>21</v>
</b>
</bs>
</hist>
</val>
</dep>
</dependencies>
</relation>
</stats> </stats>
</dbstats> </dbstats>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,2 @@
description: adds extraction metrics tables
compatibility: backwards