File: benchmark_visualize.py

package info (click to toggle)
rapidfuzz 3.12.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,436 kB
  • sloc: python: 7,571; cpp: 7,481; sh: 30; makefile: 23
file content (23 lines) | stat: -rw-r--r-- 522 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from __future__ import annotations

import matplotlib.pyplot as plt
import pandas as pd

results = pd.read_csv("temp/result.csv")

results *= 1000 * 1000
results["x_axis"] /= 1000 * 1000


ax = results.plot(x="x_axis")

# plt.xticks(list(range(0, 64*20+1, 64)))

plt.title("Performance comparison of the \nDamerauLevenshtein similarity in different libraries")
plt.xlabel("string length [in characters]")
plt.ylabel("runtime [μs]")
ax.set_xlim(xmin=0)
# ax.set_ylim(bottom=0)
# ax.set_yscale('log')
plt.grid()
plt.show()