|
38 | 38 | else: |
39 | 39 | Doublets_Split_NonVolatile.append(int(time)) |
40 | 40 |
|
41 | | -Doublets_United_Volatile = [max(1, x // 10000000) for x in Doublets_United_Volatile] |
42 | | -Doublets_United_NonVolatile = [max(1, x // 10000000) for x in Doublets_United_NonVolatile] |
43 | | -Doublets_Split_Volatile = [max(1, x // 10000000) for x in Doublets_Split_Volatile] |
44 | | -Doublets_Split_NonVolatile = [max(1, x // 10000000) for x in Doublets_Split_NonVolatile] |
45 | | -PSQL_NonTransaction = [max(1, x // 10000000) for x in PSQL_NonTransaction] |
46 | | -PSQL_Transaction = [max(1, x // 10000000) for x in PSQL_Transaction] |
47 | | - |
48 | 41 | labels = ['Create', 'Delete', 'Each Identity', 'Each Concrete', 'Each Outgoing', 'Each Incoming', 'Each All', 'Update'] |
49 | 42 | def bench1(): |
| 43 | + Doublets_United_Volatile_Pixels = [max(1, x // 10000000) for x in Doublets_United_Volatile] |
| 44 | + Doublets_United_NonVolatile_Pixels = [max(1, x // 10000000) for x in Doublets_United_NonVolatile] |
| 45 | + Doublets_Split_Volatile_Pixels = [max(1, x // 10000000) for x in Doublets_Split_Volatile] |
| 46 | + Doublets_Split_NonVolatile_Pixels = [max(1, x // 10000000) for x in Doublets_Split_NonVolatile] |
| 47 | + PSQL_NonTransaction_Pixels = [max(1, x // 10000000) for x in PSQL_NonTransaction] |
| 48 | + PSQL_Transaction_Pixels = [max(1, x // 10000000) for x in PSQL_Transaction] |
| 49 | + |
50 | 50 | y = np.arange(len(labels)) |
51 | 51 |
|
52 | 52 | width = 0.1 |
53 | 53 |
|
54 | 54 | fig, ax = plt.subplots(figsize=(12, 8)) |
55 | 55 |
|
56 | 56 |
|
57 | | - rects1 = ax.barh(y - 2*width, Doublets_United_Volatile, width, label='Doublets United Volatile', color='salmon') |
58 | | - rects2 = ax.barh(y - width, Doublets_United_NonVolatile, width, label='Doublets United NonVolatile', color='red') |
| 57 | + rects1 = ax.barh(y - 2*width, Doublets_United_Volatile_Pixels, width, label='Doublets United Volatile', color='salmon') |
| 58 | + rects2 = ax.barh(y - width, Doublets_United_NonVolatile_Pixels, width, label='Doublets United NonVolatile', color='red') |
59 | 59 |
|
60 | | - rects3 = ax.barh(y, Doublets_Split_Volatile, width, label='Doublets Split Volatile', color='lightgreen') |
61 | | - rects4 = ax.barh(y + width, Doublets_Split_NonVolatile, width, label='Doublets Split NonVolatile', color='green') |
| 60 | + rects3 = ax.barh(y, Doublets_Split_Volatile_Pixels, width, label='Doublets Split Volatile', color='lightgreen') |
| 61 | + rects4 = ax.barh(y + width, Doublets_Split_NonVolatile_Pixels, width, label='Doublets Split NonVolatile', color='green') |
62 | 62 |
|
63 | | - rects5 = ax.barh(y + 2*width, PSQL_NonTransaction, width, label='PSQL NonTransaction', color='lightblue') |
64 | | - rects6 = ax.barh(y + 3*width, PSQL_Transaction, width, label='PSQL Transaction', color='blue') |
| 63 | + rects5 = ax.barh(y + 2*width, PSQL_NonTransaction_Pixels, width, label='PSQL NonTransaction', color='lightblue') |
| 64 | + rects6 = ax.barh(y + 3*width, PSQL_Transaction_Pixels, width, label='PSQL Transaction', color='blue') |
65 | 65 |
|
66 | 66 | ax.set_xlabel('Time (ns) - Scaled to Pixels') |
67 | 67 | ax.set_title('Benchmark comparison for Doublets and PostgreSQL') |
|
0 commit comments