示例#1
0
class PlayFile(juice.Command):
    commandName = "Play-File"
    arguments = [('cookie', juice.String()), ("filename", juice.String()),
                 ("format", juice.String(optional=True))]
    response = [("done", juice.Boolean())]
示例#2
0
class Results(juice.Command):
    commandName = 'Result'
    arguments = [
        # Stats version - change this whenever the meaning of something changes
        # or a field is added or removed.
        ('version', juice.Integer()),

        # If an error occurred while collecting these stats - this probably
        # means they're bogus.
        ('error', juice.Boolean()),

        # If a particular timeout (See BasicProcess.connectionMade) elapsed
        # with no events whatsoever from the benchmark process.
        ('timeout', juice.Boolean()),

        # A unique name identifying the benchmark for which these are stats.
        ('name', juice.Unicode()),

        # The name of the benchmark associated with these stats.
        ('host', juice.Unicode()),

        # The sector size of the disk on which these stats were collected
        # (sectors are a gross lie, this is really the block size, and
        # everything else that talks about sectors is really talking about
        # blocks).
        ('sector_size', juice.Integer()),

        # Hex version info for the Python which generated these stats.
        ('python_version', juice.Unicode()),

        # Twisted SVN revision number used to generate these stats.
        ('twisted_version', juice.Unicode()),

        # Divmod SVN revision number used to generate these stats.
        ('divmod_version', juice.Unicode()),

        # Number of seconds between process startup and termination.
        ('elapsed', juice.Float()),

        # Size, in bytes, of the directory in which the child process was run.
        ('filesystem_growth', juice.Integer()),

        # Number of reads issued on the partition over the lifetime of the
        # child process.  This may include reads from other processes, if any
        # were active on the same disk when the stats were collected.
        ('read_count', juice.Integer(optional=True)),

        # Number of sectors which were read from the partition over the
        # lifetime of the child process. Same caveat as above.
        ('read_sectors', juice.Integer(optional=True)),

        # Number of writes issued to the partition over the lifetime of the
        # child process.  Same caveat as above.
        ('write_count', juice.Integer(optional=True)),

        # Number of sectors which were written to the partition over the
        # lifetime of the child process.  Same caveat as above.
        ('write_sectors', juice.Integer(optional=True)),

        # Number of milliseconds spent blocked on reading from the disk over
        # the lifetime of the child process.  Same caveat as above.
        ('read_ms', juice.Integer(optional=True)),

        # Number of milliseconds spent blocked on writing to the disk over the
        # lifetime of the child process.  Same caveat as above.
        ('write_ms', juice.Integer(optional=True)),
    ]