You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "rm5248 (via GitHub)" <gi...@apache.org> on 2025/11/02 16:13:50 UTC
[PR] Show the performance results in graphs [logging-log4cxx]
rm5248 opened a new pull request, #561:
URL: https://github.com/apache/logging-log4cxx/pull/561
Show performance results in a graphical way
This shows the performance results in a clearer manner than just the table, and makes it more obvious the relative difference between the different scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3516825857
I like that, it looks pretty good. I'll play around with it in the next few days.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3575649765
> Do you know if the web-site can use Apache echarts? I thought we were restricted to non-interactive pages.
You can add in custom HTML elements with Doxygen by using the [`\htmlonly`](https://www.doxygen.nl/manual/commands.html#cmdhtmlonly) block. This allows us to insert the proper javascript code needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3508398612
It's using the same data that you put in the table, just showing it in a graphical manner. If we want to remove the graphs, I would argue that we should also remove the performance table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3514917035
Below is a python script that will generate this:
<img width="800" height="600" alt="Appending" src="https://github.com/user-attachments/assets/3141ff69-8961-4161-b6a1-6e908ad87ed7" />
```
import re
import matplotlib.pyplot as plt
input_markdown_file = 'markdown/performance.md'
regex_pattern = [ r"Appending (.*) using (MessageBuffer), pattern: \\%m\\%n$"
, r"Appending (.*) using (FMT), pattern: \\%m\\%n$"
# , r"Appending (.*) using (MessageBuffer), pattern: \\%m\\%n/threads"
# , r"Appending (.*) using (FMT), pattern: \\%m\\%n/threads"
]
data = {'MessageBuffer': {}
, 'FMT': {}
}
line_type = {'MessageBuffer': '--'
, 'FMT': '-.'
}
# Extract the data
title = 'Appending'
image_file_name = 'images/Appending.png'
value_regex_pattern = r" *([0-9]+) ns"
with open(input_markdown_file, "r") as file:
header_found = False
separator_found = False
for line in file:
if header_found and separator_found:
# A valid table data row (starts and ends with '|')
if not (line.strip().startswith('|') and line.strip().endswith('|')):
break
# Split the line by '|' and strip whitespace from each part
# The first and last elements will be empty strings due to leading/trailing '|'
columns = [col.strip() for col in line.split('|')]
# Ensure there are enough columns to extract data (at least 3 for Benchmark and Time)
if len(columns) > 2:
value_match = re.search(value_regex_pattern, columns[2])
if value_match:
nanoseconds =value_match.group(1)
for r in regex_pattern:
benchmark_match = re.search(r, columns[1])
if benchmark_match:
formatter = benchmark_match.group(2)
message_type = benchmark_match.group(1)
data[formatter][message_type] = int(nanoseconds)
elif " Benchmark " in line:
header_found = True
elif header_found and "----" in line:
separator_found = True
else:
header_found = False
if len(data) < 2:
raise ValueError(f"Benchmark data not found in {input_markdown_file}")
# Create the bar chart
fig, ax = plt.subplots(figsize=(8, 6)) # Optional: set figure size
for formatter, item_time in data.items():
message_types = item_time.keys()
time_values = item_time.values()
ax.plot(message_types, time_values, label=formatter, linestyle=line_type[formatter])
# Add chart title and axis labels
ax.legend()
ax.set_title(title, fontsize=14)
ax.set_xlabel('Message content', fontsize=12)
ax.set_ylabel('Time (ns)', fontsize=12)
# Improve layout and remove top/right spines for cleaner look
ax.spines['right'].set_visible(False)
ax.spines['top'].set_visible(False)
plt.tight_layout()
# Save the graph as a PNG file
plt.savefig(image_file_name)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 closed pull request #561: Show the performance results in graphs
URL: https://github.com/apache/logging-log4cxx/pull/561
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3514165501
I am not sure, that should theoretically be possible. It would probably make the repository size grow pretty quickly though. Since they're just generated from libreoffice, you can just copy/paste the new values into the spreadsheet that I added and regenerate the graphs, so at least they are easy to regenerate if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3506530102
> The actual data is the average (elapsed) time and CPU
I changed it to the 'time' column. The CPU column is ~6x as large as the time column for multithreaded tests, which would make sense when there are 6 threads.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3478788451
The Iteration column is not the data, just an implementation detail.
The actual data is the average (elapsed) time and CPU
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3507487259
Are you sure this adds clarity to warrant the extra maintenance? Enough to ignore Volkan's advice?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3508908352
Can you script the graph generation?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "rm5248 (via GitHub)" <gi...@apache.org>.
rm5248 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3573454813
I updated the python code a bit, but then I realized two things:
1. benchmark can output JSON data
2. Apache echarts can be used to graph data
I messed around with echarts. It's kinda working at the moment, but I need to read the documentation more to understand how to make the graphs properly.
The graphs are a bit prettier, and also interactive so you can hover over for example:
<img width="761" height="564" alt="image" src="https://github.com/user-attachments/assets/d162e7f2-3134-4e6d-8ed5-0a9de76c3f24" />
The branch is up to date if you want to mess around with it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Show the performance results in graphs [logging-log4cxx]
Posted by "swebb2066 (via GitHub)" <gi...@apache.org>.
swebb2066 commented on PR #561:
URL: https://github.com/apache/logging-log4cxx/pull/561#issuecomment-3573659400
Do you know if the web-site can use Apache echarts? I thought we were restricted to non-interactive pages.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org