예제 #1
0
def write_active_statfileobj(end_time = None):
	"""Write active StatFileObj object to session statistics file"""
	global _active_statfileobj
	assert _active_statfileobj
	rp_base = Globals.rbdir.append("session_statistics")
	session_stats_rp = increment.get_inc(rp_base, 'data', Time.curtime)
	_active_statfileobj.finish(end_time)
	_active_statfileobj.write_stats_to_rp(session_stats_rp)
	_active_statfileobj = None
예제 #2
0
def write_active_statfileobj():
    """Write active StatFileObj object to session statistics file"""
    global _active_statfileobj
    assert _active_statfileobj
    rp_base = Globals.rbdir.append("session_statistics")
    session_stats_rp = increment.get_inc(rp_base, 'data', Time.curtime)
    _active_statfileobj.finish()
    _active_statfileobj.write_stats_to_rp(session_stats_rp)
    _active_statfileobj = None
예제 #3
0
	def init(cls):
		"""Open file stats object and prepare to write"""
		assert not (cls._fileobj or cls._rp), (cls._fileobj, cls._rp)
		rpbase = Globals.rbdir.append("file_statistics")
		suffix = Globals.compression and 'data.gz' or 'data'
		cls._rp = increment.get_inc(rpbase, suffix, Time.curtime)
		assert not cls._rp.lstat()
		cls._fileobj = cls._rp.open("wb", compress = Globals.compression)

		cls._line_sep = Globals.null_separator and '\0' or '\n'
		cls.write_docstring()
		cls.line_buffer = []
예제 #4
0
    def init(cls):
        """Open file stats object and prepare to write"""
        assert not (cls._fileobj or cls._rp), (cls._fileobj, cls._rp)
        rpbase = Globals.rbdir.append("file_statistics")
        suffix = Globals.compression and 'data.gz' or 'data'
        cls._rp = increment.get_inc(rpbase, suffix, Time.curtime)
        assert not cls._rp.lstat()
        cls._fileobj = cls._rp.open("wb", compress=Globals.compression)

        cls._line_sep = Globals.null_separator and '\0' or '\n'
        cls.write_docstring()
        cls.line_buffer = []