示例#1
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type histogram")
        argparser.add_argument('--bucketsize',
                               '-b',
                               action='store',
                               metavar='SIZE',
                               help="histogram bucket size in seconds",
                               default=60)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.logscale = args['logscale']
        # get bucket size, either as int (seconds) or as string
        # (see timeunits above)
        bs = sub_args['bucketsize']
        try:
            self.bucketsize = int(bs)
        except ValueError:
            self.bucketsize = self.timeunits[bs]

        self.ylabel = "# connections opened/closed"

        self.group_by = opened_closed
示例#2
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type histogram")
        argparser.add_argument('--bucketsize',
                               '-b',
                               action='store',
                               metavar='SIZE',
                               help="histogram bucket size in seconds",
                               default=60)
        argparser.add_argument(
            '--no-stacked',
            action='store_true',
            help=
            "switch graph mode from stacked histogram (default) to side-by-side histograms.",
            default=False)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.logscale = args['logscale']
        # get bucket size, either as int (seconds) or as string (see timeunits above)
        bs = sub_args['bucketsize']
        try:
            self.bucketsize = int(bs)
        except ValueError:
            self.bucketsize = self.timeunits[bs]
        self.barstacked = not sub_args['no_stacked']

        self.ylabel = "# lines per %i second bin" % self.bucketsize
示例#3
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        self.logscale = args['logscale']

        # parse arguments further to get --yaxis argument
        argparser = argparse.ArgumentParser("mplotqueries --type scatter")
        argparser.add_argument('--yaxis',
                               '-y',
                               action='store',
                               metavar='FIELD',
                               default='duration')
        argparser.add_argument('--yaxis-regex-mode',
                               action='store_true',
                               default=False)
        args = vars(argparser.parse_args(unknown_args))

        self.field = args['yaxis']
        self.regex_mode = args['yaxis_regex_mode']

        if self.regex_mode:
            self.ylabel = 'regex: "%s"' % self.field
        elif args['yaxis'] == 'duration':
            self.ylabel = 'duration in ms'
        else:
            self.ylabel = args['yaxis']

        self.durlines = []
示例#4
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type histogram")
        argparser.add_argument('--bucketsize', '-b', action='store',
                               metavar='SIZE',
                               help="histogram bucket size in seconds",
                               default=60)
        argparser.add_argument('--no-stacked', action='store_true',
                               help=("switch graph mode from stacked "
                                     "histogram (default) to side-by-side "
                                     "histograms."), default=False)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.logscale = args['logscale']
        # get bucket size, either as int (seconds) or as string
        # (see timeunits above)
        bs = sub_args['bucketsize']
        try:
            self.bucketsize = int(bs)
        except ValueError:
            self.bucketsize = self.timeunits[bs]
        self.barstacked = not sub_args['no_stacked']

        self.ylabel = "# lines per %i second bin" % self.bucketsize
示例#5
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type range")
        argparser.add_argument('--gap', action='store', metavar='SEC', type=int, help="gap threshold in seconds after which a new line is started (default: 60)", default=None)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.gap = sub_args['gap']
示例#6
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type range")
        argparser.add_argument('--gap', action='store', metavar='SEC',
                               type=int, help=("gap threshold in seconds "
                                               "after which a new line is "
                                               "started (default: 60)"),
                               default=None)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.gap = sub_args['gap']
示例#7
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --yaxis argument
        self.argparser = argparse.ArgumentParser("mplotqueries --type scatter")
        self.argparser.add_argument('--yaxis', '-y', action='store', metavar='FIELD', default='duration')
        args = vars(self.argparser.parse_args(unknown_args))

        self.field = args['yaxis']
        if args['yaxis'] == 'duration':
            self.ylabel = 'duration in ms'
        else:
            self.ylabel = args['yaxis']
示例#8
0
    def plot(self, axis, ith_plot, total_plots, limits):
        artists = BasePlotType.plot(self, axis, ith_plot, total_plots, limits)

        # parse all groups and plot currently open number of connections
        artist = self.plot_total_conns(axis)
        artists.append(artist)

        return artists
示例#9
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --yaxis argument
        self.argparser = argparse.ArgumentParser("mplotqueries --type scatter")
        self.argparser.add_argument('--yaxis',
                                    '-y',
                                    action='store',
                                    metavar='FIELD',
                                    default='duration')
        args = vars(self.argparser.parse_args(unknown_args))

        self.field = args['yaxis']
        if args['yaxis'] == 'duration':
            self.ylabel = 'duration in ms'
        else:
            self.ylabel = args['yaxis']
示例#10
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        # parse arguments further to get --bucketsize argument
        argparser = argparse.ArgumentParser("mplotqueries --type histogram")
        argparser.add_argument('--bucketsize', '-b', action='store', metavar='SIZE', help="histogram bucket size in seconds", default=60)
        sub_args = vars(argparser.parse_args(unknown_args))

        self.logscale = args['logscale']
        # get bucket size, either as int (seconds) or as string (see timeunits above)
        bs = sub_args['bucketsize']
        try:
            self.bucketsize = int(bs)
        except ValueError:
            self.bucketsize = self.timeunits[bs]

        self.ylabel = "# connections opened/closed"
示例#11
0
    def plot(self, axis, ith_plot, total_plots, limits):
        artists = BasePlotType.plot(self, axis, ith_plot, total_plots, limits)

        # parse all groups and plot currently open number of connections
        artist = self.plot_total_conns(axis)
        artists.append(artist)

        return artists
示例#12
0
    def __init__(self, args=None, unknown_args=None):
        BasePlotType.__init__(self, args, unknown_args)

        self.logscale = args['logscale']

        # parse arguments further to get --yaxis argument
        argparser = argparse.ArgumentParser("mplotqueries --type scatter")
        argparser.add_argument('--yaxis', '-y', action='store', metavar='FIELD', default='duration')
        argparser.add_argument('--yaxis-regex-mode', action='store_true', default=False)
        args = vars(argparser.parse_args(unknown_args))

        self.field = args['yaxis']
        self.regex_mode = args['yaxis_regex_mode']

        if self.regex_mode:
            self.ylabel = 'regex: "%s"' % self.field
        elif args['yaxis'] == 'duration':
            self.ylabel = 'duration in ms'
        else:
            self.ylabel = args['yaxis']

        self.durlines = []
示例#13
0
    def __init__(self, args=None, unknown_args=None):
        # Only call baseplot type constructor, we don't need argparser
        BasePlotType.__init__(self, args, unknown_args)

        self.ylabel = 'nscanned / n ratio'
示例#14
0
    def __init__(self, args=None, unknown_args=None):
        # Only call baseplot type constructor, we don't need argparser
        BasePlotType.__init__(self, args, unknown_args)

        self.ylabel = 'nscanned / n ratio'