nsmcp::AccessRecordStoreSQLite method coveredBytes (public)

 <instance of nsmcp::AccessRecordStoreSQLite[i]> coveredBytes fid lo \
    hi

Defined in /usr/local/ns/tcl/nsmcp/log-traffic-record-store.tcl

Count committed bytes overlapping a source interval. Intersect the interval with persisted coverage ranges. This is stored coverage, not a measurement of current source-file contents.

Parameters:
fid (required)
Stored source-file identifier.
lo (required)
Inclusive lower byte boundary.
hi (required)
Exclusive upper byte boundary.
Returns:
The number of covered bytes in the interval.

Testcases:
No testcase defined.
Source code:
return [${:db} scalar {
    SELECT coalesce(sum(min(hi, :hi)-max(lo, :lo)), 0) FROM main.ranges WHERE fid=:fid AND hi>:lo AND
    lo<:hi
}]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: