.. Copyright 2023 Lawrence Livermore National Security, LLC and other Benchpark Project Developers. See the top-level COPYRIGHT file for details. SPDX-License-Identifier: Apache-2.0 ######################## Query Performance Data ######################## **Glossary terms:** :ref:`Benchmark `, :ref:`Application `, :ref:`Experiment `, :ref:`System `, :ref:`Modifier ` Query the average time for the ``main`` region in the completed HPL workspace: .. code-block:: console $ benchpark query workspace/fluxtainer/hpl/workspace \ --metric "Avg time/rank" \ --query-regions-byname main The original plotting example uses Matplotlib to create a stacked bar chart from the queried data: .. code-block:: python import pandas as pd import matplotlib.pyplot as plt df_comp = pd.read_csv("computation-time.csv") df_comm = pd.read_csv("communication-time.csv") value_col = "Avg time/rank (exc)" version_col = "packages.dependencies.hip.version" group_cols = ["cluster", "application_name", version_col] bar_df = ( pd.concat( [ df_comp.assign(region="Computation"), df_comm.assign(region="Communication"), ], ignore_index=True, ) .groupby(group_cols + ["region"])[value_col] .mean() .unstack(fill_value=0) .reset_index() ) bar_df["total"] = bar_df["Computation"] + bar_df["Communication"] amg_df = bar_df[bar_df["application_name"] == "amg2023"].set_index( ["cluster", version_col] ) ax = amg_df[["Computation", "Communication"]].plot.bar(stacked=True) ax.set_xlabel("System and ROCm version") ax.set_ylabel("Average time per rank (seconds)") plt.tight_layout() plt.show() .. note:: The following figure contains extra styling that is not provided in the simplified code snippet above. .. figure:: /_static/images/query-stacked-barchart-amg2023.png :width: 700 :align: center Example visualization created from queried performance data. For additional metrics, region selection, and CSV options, see :doc:`/benchpark-query`. *********************** Choose Your Next Step *********************** .. tutorialcontainer:: tutorial-next-steps .. tutorialcontainer:: tutorial-next-step tutorial-goal-search :ref:`I have generated raw performance data to make my own figures. I want to begin another workflow by searching what is available in Benchpark. `