| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>apache_beam.testing.load_tests.load_test_metrics_utils module — Apache Beam documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> |
| <script type="text/javascript" src="_static/jquery.js"></script> |
| <script type="text/javascript" src="_static/underscore.js"></script> |
| <script type="text/javascript" src="_static/doctools.js"></script> |
| <script type="text/javascript" src="_static/language_data.js"></script> |
| |
| <script type="text/javascript" src="_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
| <link rel="index" title="Index" href="genindex.html" /> |
| <link rel="search" title="Search" href="search.html" /> |
| <link rel="next" title="apache_beam.testing.datatype_inference module" href="apache_beam.testing.datatype_inference.html" /> |
| <link rel="prev" title="apache_beam.testing.load_tests package" href="apache_beam.testing.load_tests.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="index.html" class="icon icon-home"> Apache Beam |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.coders.html">apache_beam.coders package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.dataframe.html">apache_beam.dataframe package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.internal.html">apache_beam.internal package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.io.html">apache_beam.io package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.metrics.html">apache_beam.metrics package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.ml.html">apache_beam.ml package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.options.html">apache_beam.options package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.portability.html">apache_beam.portability package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.runners.html">apache_beam.runners package</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="apache_beam.testing.html">apache_beam.testing package</a><ul class="current"> |
| <li class="toctree-l2 current"><a class="reference internal" href="apache_beam.testing.html#subpackages">Subpackages</a><ul class="current"> |
| <li class="toctree-l3"><a class="reference internal" href="apache_beam.testing.benchmarks.html">apache_beam.testing.benchmarks package</a></li> |
| <li class="toctree-l3 current"><a class="reference internal" href="apache_beam.testing.load_tests.html">apache_beam.testing.load_tests package</a><ul class="current"> |
| <li class="toctree-l4 current"><a class="reference internal" href="apache_beam.testing.load_tests.html#submodules">Submodules</a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="apache_beam.testing.html#submodules">Submodules</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.tools.html">apache_beam.tools package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.transforms.html">apache_beam.transforms package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.typehints.html">apache_beam.typehints package</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.utils.html">apache_beam.utils package</a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.error.html">apache_beam.error module</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.pipeline.html">apache_beam.pipeline module</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.pvalue.html">apache_beam.pvalue module</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="apache_beam.version.html">apache_beam.version module</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="index.html">Apache Beam</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="index.html">Docs</a> »</li> |
| |
| <li><a href="apache_beam.testing.html">apache_beam.testing package</a> »</li> |
| |
| <li><a href="apache_beam.testing.load_tests.html">apache_beam.testing.load_tests package</a> »</li> |
| |
| <li>apache_beam.testing.load_tests.load_test_metrics_utils module</li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="_sources/apache_beam.testing.load_tests.load_test_metrics_utils.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-apache_beam.testing.load_tests.load_test_metrics_utils"> |
| <span id="apache-beam-testing-load-tests-load-test-metrics-utils-module"></span><h1>apache_beam.testing.load_tests.load_test_metrics_utils module<a class="headerlink" href="#module-apache_beam.testing.load_tests.load_test_metrics_utils" title="Permalink to this headline">¶</a></h1> |
| <p>Utility functions used for integrating Metrics API into load tests pipelines.</p> |
| <p>Metrics are send to BigQuery in following format: |
| test_id | submit_timestamp | metric_type | value</p> |
| <p>The ‘test_id’ is common for all metrics for one run. |
| Currently it is possible to have following metrics types: |
| * runtime |
| * total_bytes_count</p> |
| <dl class="function"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.parse_step"> |
| <code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">parse_step</code><span class="sig-paren">(</span><em>step_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#parse_step"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.parse_step" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Replaces white spaces and removes ‘Step:’ label</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>step_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – step name passed in metric ParDo</td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">lower case step name without namespace and step label</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.split_metrics_by_namespace_and_name"> |
| <code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">split_metrics_by_namespace_and_name</code><span class="sig-paren">(</span><em>metrics</em>, <em>namespace</em>, <em>name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#split_metrics_by_namespace_and_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.split_metrics_by_namespace_and_name" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Splits metrics list namespace and name.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>metrics</strong> – list of metrics from pipeline result</li> |
| <li><strong>namespace</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – filter metrics by namespace</li> |
| <li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – filter metrics by name</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">two lists - one of metrics which are matching filters |
| and second of not matching</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.get_generic_distributions"> |
| <code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">get_generic_distributions</code><span class="sig-paren">(</span><em>generic_dists</em>, <em>metric_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#get_generic_distributions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.get_generic_distributions" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates flatten list of distributions per its value type. |
| A generic distribution is the one which is not processed but saved in |
| the most raw version.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>generic_dists</strong> – list of distributions to be saved</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – id of the current test run</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list of dictionaries made from <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric" title="apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric"><code class="xref py py-class docutils literal notranslate"><span class="pre">DistributionMetric</span></code></a></p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.get_all_distributions_by_type"> |
| <code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">get_all_distributions_by_type</code><span class="sig-paren">(</span><em>dist</em>, <em>metric_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#get_all_distributions_by_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.get_all_distributions_by_type" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates new list of objects with type of each distribution |
| metric value.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>dist</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><em>object</em></a>) – DistributionMetric object to be parsed</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – id of the current test run</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">list of <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric" title="apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric"><code class="xref py py-class docutils literal notranslate"><span class="pre">DistributionMetric</span></code></a> objects</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.get_distribution_dict"> |
| <code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">get_distribution_dict</code><span class="sig-paren">(</span><em>metric_type</em>, <em>submit_timestamp</em>, <em>dist</em>, <em>metric_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#get_distribution_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.get_distribution_dict" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Function creates <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric" title="apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric"><code class="xref py py-class docutils literal notranslate"><span class="pre">DistributionMetric</span></code></a></p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>metric_type</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – type of value from distribution metric which will |
| be saved (ex. max, min, mean, sum)</li> |
| <li><strong>submit_timestamp</strong> – timestamp when metric is saved</li> |
| <li><strong>dist</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><em>object</em></a>) – </li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – id of the current test run</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">dictionary prepared for saving according to schema</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">MetricsReader</code><span class="sig-paren">(</span><em>project_name=None</em>, <em>bq_table=None</em>, <em>bq_dataset=None</em>, <em>publish_to_bq=False</em>, <em>influxdb_options=None</em>, <em>namespace=None</em>, <em>filters=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MetricsReader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader" title="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader"><code class="xref py py-class docutils literal notranslate"><span class="pre">MetricsReader</span></code></a> retrieves metrics from pipeline result, |
| prepares it for publishers and setup publishers.</p> |
| <p>Initializes <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader" title="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader"><code class="xref py py-class docutils literal notranslate"><span class="pre">MetricsReader</span></code></a> .</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>project_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – project with BigQuery where metrics will be saved</li> |
| <li><strong>bq_table</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – BigQuery table where metrics will be saved</li> |
| <li><strong>bq_dataset</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – BigQuery dataset where metrics will be saved</li> |
| <li><strong>namespace</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – Namespace of the metrics</li> |
| <li><strong>filters</strong> – MetricFilter to query only filtered metrics</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <dl class="attribute"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publishers"> |
| <code class="descname">publishers</code><em class="property"> = []</em><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publishers" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publish_metrics"> |
| <code class="descname">publish_metrics</code><span class="sig-paren">(</span><em>result</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MetricsReader.publish_metrics"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publish_metrics" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publish_values"> |
| <code class="descname">publish_values</code><span class="sig-paren">(</span><em>labeled_values</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MetricsReader.publish_values"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MetricsReader.publish_values" title="Permalink to this definition">¶</a></dt> |
| <dd><p>The method to publish simple labeled values.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>labeled_values</strong> (<em>List</em><em>[</em><em>Tuple</em><em>(</em><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a><em>, </em><a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.9)"><em>int</em></a><em>)</em><em>]</em>) – list of (label, value)</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.Metric"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">Metric</code><span class="sig-paren">(</span><em>submit_timestamp</em>, <em>metric_id</em>, <em>value</em>, <em>metric=None</em>, <em>label=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#Metric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Metric base class in ready-to-save format.</p> |
| <p>Initializes <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric" title="apache_beam.testing.load_tests.load_test_metrics_utils.Metric"><code class="xref py py-class docutils literal notranslate"><span class="pre">Metric</span></code></a></p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>metric</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><em>object</em></a>) – object of metric result</li> |
| <li><strong>submit_timestamp</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – date-time of saving metric to database</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – unique id to identify test run</li> |
| <li><strong>value</strong> – value of metric</li> |
| <li><strong>label</strong> – custom metric name to be saved in database</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.Metric.as_dict"> |
| <code class="descname">as_dict</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#Metric.as_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric.as_dict" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.CounterMetric"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">CounterMetric</code><span class="sig-paren">(</span><em>counter_metric</em>, <em>submit_timestamp</em>, <em>metric_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#CounterMetric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.CounterMetric" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric" title="apache_beam.testing.load_tests.load_test_metrics_utils.Metric"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.testing.load_tests.load_test_metrics_utils.Metric</span></code></a></p> |
| <p>The Counter Metric in ready-to-publish format.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>counter_metric</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><em>object</em></a>) – counter metric object from MetricResult</li> |
| <li><strong>submit_timestamp</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – date-time of saving metric to database</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – unique id to identify test run</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">DistributionMetric</code><span class="sig-paren">(</span><em>dist_metric</em>, <em>submit_timestamp</em>, <em>metric_id</em>, <em>metric_type</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#DistributionMetric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.DistributionMetric" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric" title="apache_beam.testing.load_tests.load_test_metrics_utils.Metric"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.testing.load_tests.load_test_metrics_utils.Metric</span></code></a></p> |
| <p>The Distribution Metric in ready-to-publish format.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>dist_metric</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><em>object</em></a>) – distribution metric object from MetricResult</li> |
| <li><strong>submit_timestamp</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.9)"><em>float</em></a>) – date-time of saving metric to database</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – unique id to identify test run</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.RuntimeMetric"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">RuntimeMetric</code><span class="sig-paren">(</span><em>runtime_list</em>, <em>metric_id</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#RuntimeMetric"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.RuntimeMetric" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.Metric" title="apache_beam.testing.load_tests.load_test_metrics_utils.Metric"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.testing.load_tests.load_test_metrics_utils.Metric</span></code></a></p> |
| <p>The Distribution Metric in ready-to-publish format.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>runtime_list</strong> – list of distributions metrics from MetricResult |
| with runtime name</li> |
| <li><strong>metric_id</strong> (<em>uuid</em>) – unique id to identify test run</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">ConsoleMetricsPublisher</code><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#ConsoleMetricsPublisher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher" title="apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher"><code class="xref py py-class docutils literal notranslate"><span class="pre">ConsoleMetricsPublisher</span></code></a> publishes collected metrics |
| to console output.</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher.publish"> |
| <code class="descname">publish</code><span class="sig-paren">(</span><em>results</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#ConsoleMetricsPublisher.publish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.ConsoleMetricsPublisher.publish" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">BigQueryMetricsPublisher</code><span class="sig-paren">(</span><em>project_name</em>, <em>table</em>, <em>dataset</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#BigQueryMetricsPublisher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher" title="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher"><code class="xref py py-class docutils literal notranslate"><span class="pre">BigQueryMetricsPublisher</span></code></a> publishes collected metrics |
| to BigQuery output.</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher.publish"> |
| <code class="descname">publish</code><span class="sig-paren">(</span><em>results</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#BigQueryMetricsPublisher.publish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryMetricsPublisher.publish" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">BigQueryClient</code><span class="sig-paren">(</span><em>project_name</em>, <em>table</em>, <em>dataset</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#BigQueryClient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>A <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient" title="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient"><code class="xref py py-class docutils literal notranslate"><span class="pre">BigQueryClient</span></code></a> publishes collected metrics to |
| BigQuery output.</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient.save"> |
| <code class="descname">save</code><span class="sig-paren">(</span><em>results</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#BigQueryClient.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.BigQueryClient.save" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">InfluxDBMetricsPublisherOptions</code><span class="sig-paren">(</span><em>measurement</em>, <em>db_name</em>, <em>hostname</em>, <em>user=None</em>, <em>password=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#InfluxDBMetricsPublisherOptions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions.validate"> |
| <code class="descname">validate</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#InfluxDBMetricsPublisherOptions.validate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions.validate" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions.http_auth_enabled"> |
| <code class="descname">http_auth_enabled</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#InfluxDBMetricsPublisherOptions.http_auth_enabled"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisherOptions.http_auth_enabled" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisher"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">InfluxDBMetricsPublisher</code><span class="sig-paren">(</span><em>options</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#InfluxDBMetricsPublisher"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisher" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.9)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <p>Publishes collected metrics to InfluxDB database.</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisher.publish"> |
| <code class="descname">publish</code><span class="sig-paren">(</span><em>results</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#InfluxDBMetricsPublisher.publish"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.InfluxDBMetricsPublisher.publish" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">MeasureTime</code><span class="sig-paren">(</span><em>namespace</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="apache_beam.transforms.core.html#apache_beam.transforms.core.DoFn" title="apache_beam.transforms.core.DoFn"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.transforms.core.DoFn</span></code></a></p> |
| <p>A distribution metric prepared to be added to pipeline as ParDo |
| to measure runtime.</p> |
| <p>Initializes <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime" title="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime"><code class="xref py py-class docutils literal notranslate"><span class="pre">MeasureTime</span></code></a>.</p> |
| <p>namespace(str): namespace of metric</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.start_bundle"> |
| <code class="descname">start_bundle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureTime.start_bundle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.start_bundle" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.finish_bundle"> |
| <code class="descname">finish_bundle</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureTime.finish_bundle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.finish_bundle" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.process"> |
| <code class="descname">process</code><span class="sig-paren">(</span><em>element</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureTime.process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureTime.process" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">MeasureBytes</code><span class="sig-paren">(</span><em>namespace</em>, <em>extractor=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureBytes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="apache_beam.transforms.core.html#apache_beam.transforms.core.DoFn" title="apache_beam.transforms.core.DoFn"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.transforms.core.DoFn</span></code></a></p> |
| <p>Metric to measure how many bytes was observed in pipeline.</p> |
| <p>Initializes <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes" title="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes"><code class="xref py py-class docutils literal notranslate"><span class="pre">MeasureBytes</span></code></a>.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>namespace</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.9)"><em>str</em></a>) – metric namespace</li> |
| <li><strong>extractor</strong> – function to extract elements to be count</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <dl class="attribute"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes.LABEL"> |
| <code class="descname">LABEL</code><em class="property"> = 'total_bytes'</em><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes.LABEL" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes.process"> |
| <code class="descname">process</code><span class="sig-paren">(</span><em>element</em>, <em>*args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureBytes.process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureBytes.process" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">CountMessages</code><span class="sig-paren">(</span><em>namespace</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#CountMessages"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="apache_beam.transforms.core.html#apache_beam.transforms.core.DoFn" title="apache_beam.transforms.core.DoFn"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.transforms.core.DoFn</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages.LABEL"> |
| <code class="descname">LABEL</code><em class="property"> = 'total_messages'</em><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages.LABEL" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages.process"> |
| <code class="descname">process</code><span class="sig-paren">(</span><em>element</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#CountMessages.process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.CountMessages.process" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">MeasureLatency</code><span class="sig-paren">(</span><em>namespace</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureLatency"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="apache_beam.transforms.core.html#apache_beam.transforms.core.DoFn" title="apache_beam.transforms.core.DoFn"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.transforms.core.DoFn</span></code></a></p> |
| <p>A distribution metric which captures the latency based on the timestamps |
| of the processed elements.</p> |
| <p>Initializes <a class="reference internal" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency" title="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency"><code class="xref py py-class docutils literal notranslate"><span class="pre">MeasureLatency</span></code></a>.</p> |
| <p>namespace(str): namespace of metric</p> |
| <dl class="attribute"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency.LABEL"> |
| <code class="descname">LABEL</code><em class="property"> = 'latency'</em><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency.LABEL" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency.process"> |
| <code class="descname">process</code><span class="sig-paren">(</span><em>element</em>, <em>timestamp=TimestampParam</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#MeasureLatency.process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.MeasureLatency.process" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.AssignTimestamps"> |
| <em class="property">class </em><code class="descclassname">apache_beam.testing.load_tests.load_test_metrics_utils.</code><code class="descname">AssignTimestamps</code><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#AssignTimestamps"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.AssignTimestamps" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="apache_beam.transforms.core.html#apache_beam.transforms.core.DoFn" title="apache_beam.transforms.core.DoFn"><code class="xref py py-class docutils literal notranslate"><span class="pre">apache_beam.transforms.core.DoFn</span></code></a></p> |
| <p>DoFn to assigned timestamps to elements.</p> |
| <dl class="method"> |
| <dt id="apache_beam.testing.load_tests.load_test_metrics_utils.AssignTimestamps.process"> |
| <code class="descname">process</code><span class="sig-paren">(</span><em>element</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/apache_beam/testing/load_tests/load_test_metrics_utils.html#AssignTimestamps.process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#apache_beam.testing.load_tests.load_test_metrics_utils.AssignTimestamps.process" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="apache_beam.testing.datatype_inference.html" class="btn btn-neutral float-right" title="apache_beam.testing.datatype_inference module" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="apache_beam.testing.load_tests.html" class="btn btn-neutral float-left" title="apache_beam.testing.load_tests package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| © Copyright |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |