text: """
  @ File:     csv_eval.py
  @ Author:   pleiadesian
  @ Datetime: 2019-12-02 11:40
  """
  import numpy as np
  import pandas as pd
  from bokeh.plotting import figure, output_file, save
  from bokeh.models import ColumnDataSource
  
  headers = ['Load', 'Throughput', 'Avg', '95%', '99%']
  
  csvdata = pd.read_csv("out_nolb_cpu.csv", sep=',', names=headers)
  csvdata_nginx = pd.read_csv("out_lb_cpu.csv", sep=',', names=headers)
  
  source = ColumnDataSource(data=csvdata)
  source_nginx = ColumnDataSource(data=csvdata_nginx)
  
  # your input
  line = 'Load'
  col = '99%'
  a = csvdata[col].values[1:].astype(np.float64)
  b = csvdata_nginx[col].values[1:].astype(np.float64)
  x = a.max() if a.max() > b.max() else b.max()
  y_axis = int(x * 1.05)
  x_axis = 100
  
  p = figure(plot_width=600, plot_height=400,
             x_axis_label=line, y_axis_label=col, x_range=[0, x_axis], y_range=[0, y_axis], title=col)
  p.line(csvdata[line], csvdata[col], color='blue', line_width=2, legend_label='No load balance')
  p.line(csvdata_nginx[line], csvdata_nginx[col], color='red', line_width=2, legend_label='load balance')
  p.circle(x=line, y=col, source=source, size=2, color='red', alpha=0.8)
  p.circle(x=line, y=col, source=source_nginx, size=2, color='red', alpha=0.8)
  p.legend.location = "top_left"
  p.xaxis.axis_label = line
  p.yaxis.axis_label = col
  output_file("out_" + col + ".html")
  save(p)
  