mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
refine Val "footprint" to equate long strings with multiple objects
This commit is contained in:
parent
d7e30d9ee2
commit
1f9fa4304d
6 changed files with 20 additions and 1 deletions
|
@ -12,6 +12,7 @@ l1, 3
|
|||
l1b, 6
|
||||
l2, 7
|
||||
l2b, 9
|
||||
l2c, T
|
||||
v1, 8
|
||||
v2, 18
|
||||
v3, 11
|
||||
|
|
|
@ -54,6 +54,12 @@ event zeek_init()
|
|||
local l2b = r2($a=3, $b1=99.0, $c="I'm here");
|
||||
print "l2b", val_footprint(l2b);
|
||||
|
||||
local l2c = r2($a=3, $b1=99e99, $c="I'm here and really very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very very long-winded");
|
||||
# In the following, we just print the comparison rather than the
|
||||
# actual footprint value, since the latter will change depending
|
||||
# on the size of C++ pointers and the like.
|
||||
print "l2c", val_footprint(l2c) > val_footprint(l2b);
|
||||
|
||||
local v1 = vector(9, 7, 3, 1);
|
||||
print "v1", val_footprint(v1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue