rm5248 commented on code in PR #567:
URL: https://github.com/apache/logging-log4cxx/pull/567#discussion_r2568910918


##########
src/site/test_echarts.html:
##########


Review Comment:
   test code kept intentionally?



##########
src/site/generate_appending_a_log_message.js:
##########
@@ -0,0 +1,98 @@
+
+// Get the DOM container for the plot
+var containerDOM = document.getElementById('appending_a_log_message_plot');
+if (!containerDOM) {
+       throw new Error("Could not find 'appending_a_log_message_plot' 
element");
+}
+var myChart = echarts.init(containerDOM, null, { renderer: 'canvas' });
+
+
+// Find the benchmark html table
+var benchmark_data = null;
+var element = document.getElementById('benchmark_data_marker');
+while (element && element.tagName) {
+       if (element.tagName === 'TABLE') {
+               benchmark_data = element;
+               break;
+       }
+       element = element.nextElementSibling;
+}
+if (!benchmark_data) {
+       throw new Error("Could not find benchmark data");;
+}
+
+// Identify the benchmark tests to be included on the plot
+var benchmark_pattern = [];
+benchmark_pattern.push(new RegExp("Appending (.*) using ([A-Za-z]+), pattern: 
\\%m\\%n$"));
+benchmark_pattern.push(new RegExp("Async, Sending (.*) using ([A-Za-z <]+)$"));
+const value_regex_pattern = new RegExp("([0-9]+) ns")
+
+// Extract the data

Review Comment:
   some thoughts:
   
   1. instead of extracting the data from the table, we can have a JSON file 
generated from the benchmark application that can easily be sucked into the JS 
code
   2. if we generate the JSON file, should we just generate the table on the 
fly?  this could be done with a simple python script during the build process 
if we want to keep the data static.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to