text_html_output_2.png
import pandas as pd

import plotly.express as px

stream = open('../input/bbk-kunpeng/perf_test_result.txt', 'r')
stream = stream.read()

ds = pd.DataFrame(columns=['N', 'NRHS', 'data_type', 'gflops', 'uplo'])

datatype = 'single'
N = 0
NRHS = 0
uplo = 'U'
gflops = 0.0
cnt = 0
for line in stream.split('\n'):
    if line == 'test SINGLE':
        datatype = 'single'
    elif line == 'test DOUBLE':
        datatype = 'double'
    elif line == 'test COMPLEX':
        datatype = 'complex'
    elif line == 'test COMPLEX16':
        datatype = 'complex16'
    elif line.startswith('N='):
        splited = line.split(',')
        N = int(splited[0].split('=')[1])
        NRHS = int(splited[1].split('=')[1])
        uplo = splited[2].split('=')[1]
    elif line.startswith('gflops'):
        gflops = float(line.split('=')[1])
        ds.loc[cnt] = [N, NRHS, datatype, gflops, uplo]
        cnt += 1
ds.to_csv('performance test.csv')

from _plotly_utils.basevalidators import textwrap
fig = px.line(ds, x='N', y='gflops', color='data_type', facet_col_wrap=2, title='Performance of BBK on 32 core')
fig.show()