#and then check to see how big the buffers were that the scheduler allocated
buf1 = fg.src.bufferout_size()
buf2 = fg.amp.bufferout_size() …
just curious.
David S.
Sorry, there’s no way to fetch it from python.
However, the allocate method on line 52 of flow_graph.py is where the
size is determined and the buffer allocated. You could print it just
before the return.
def allocate (self, m, index):
"""allocate buffer for output index of block m"""
item_size = m.output_signature().sizeof_stream_item (index)
nitems = self.fixed_buffer_size / item_size
if nitems < 2 * m.output_multiple ():
nitems = 2 * m.output_multiple ()
# if any downstream blocks is a decimator and/or has a large
output_multiple,
# ensure that we have a buffer at least 2 * their
decimation_factor*output_multiple
for mdown in self.flow_graph.downstream_verticies_port(m,
index):
decimation = int(1.0 / mdown.relative_rate())
nitems = max(nitems, 2 * (decimation * mdown.output_multiple() +
mdown.history()))
return buffer (nitems, item_size) # buffer size in bytes
= nitems * item_size
Eric
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.