<jupyter_start><jupyter_text>**Standard Raspbian Kernel**<jupyter_code># rPi 4B - loading data standard raspbian kernel multi-thread and single-thread solution 
path_4b = "data/performance/raspberry_pi/buster/4B"

kernel_std_4b_mt = load_csv_data("std_kernel_4B_multithread_output.csv", path_4b)
kernel_std_4b_mt['time'] -= kernel_std_4b_mt['time'][0]

kernel_std_4b_st = load_csv_data("std_kernel_4B_singlethread_output.csv", path_4b)
kernel_std_4b_st['time'] -= kernel_std_4b_st['time'][0]

# rPi 3B+ - loading data standard raspbian kernel multi-thread and single-thread solution 
path_3b_p = "data/performance/raspberry_pi/buster/3B+"

kernel_std_3b_p_mt = load_csv_data("std_kernel_3B+_multithread_output.csv", path_3b_p)
kernel_std_3b_p_mt['time'] -= kernel_std_3b_p_mt['time'][0]

kernel_std_3b_p_st = load_csv_data("std_kernel_3B+_singlethread_output.csv", path_3b_p)
kernel_std_3b_p_st['time'] -= kernel_std_3b_p_st['time'][0]
# rPi 4B - plotting standard raspbian kernel with multi-thread solution
timestamp_std_4b_mt = kernel_std_4b_mt.time/60
time_std_4b_mt = kernel_std_4b_mt.seconds + kernel_std_4b_mt.microseconds/1000000
temp_std_4b_mt = (kernel_std_4b_mt.cpu_temp + kernel_std_4b_mt.gpu_temp)/2
title = "Raspberry Pi 4 Model B\nusing Stardard Raspbian Kernel 4.19.57-v7+\n(Queens: 12, Threads: 4, Iterations: 100)"

plot_data(timestamp_std_4b_mt[:99], time_std_4b_mt[:99], temp_std_4b_mt[:99], (17, 51, 62, 82), title)
print("Time to 45 iterations: %.2f" %timestamp_std_4b_mt[44])
# rPi 3B+ - plotting standard raspbian kernel with multi-thread solution
timestamp_std_3b_p_mt = (kernel_std_3b_p_mt.time)/60
time_std_3b_p_mt = kernel_std_3b_p_mt.seconds + kernel_std_3b_p_mt.microseconds/1000000
temp_std_3b_p_mt = (kernel_std_3b_p_mt.cpu_temp + kernel_std_3b_p_mt.gpu_temp)/2
title = "Raspberry Pi 3 Model B+\nusing Stardard Raspbian Kernel 4.19.57-v7+\n(Queens: 12, Threads: 4, Iterations: 100)"
plot_data(timestamp_std_3b_p_mt[:99], time_std_3b_p_mt[:99], temp_std_3b_p_mt[:99], (17, 51, 62, 82), title)
print("Time to 45 iterations: %.2f" %timestamp_std_3b_p_mt[44])
# rPi 4B - plotting standard raspbian kernel with single-thread solution

timestamp_std_4b_st = kernel_std_4b_st.time/60
time_std_4b_st = kernel_std_4b_st.seconds + kernel_std_4b_st.microseconds/1000000
temp_std_4b_st = (kernel_std_4b_st.cpu_temp + kernel_std_4b_st.gpu_temp)/2
title = "Raspberry Pi 4 Model B\nusing Stardard Raspbian Kernel 4.19.57-v7+\n(Queens: 12, Threads: 1, Iterations: 45)"
plot_data(timestamp_std_4b_st[:45], time_std_4b_st[:45], temp_std_4b_st[:45], (65, 174, 58, 67), title)
print("Time to 45 iterations: %.2f" %timestamp_std_4b_st[44])
# rPi 3B+ - plotting standard raspbian kernel with single-thread solution

timestamp_std_3b_p_st = kernel_std_3b_p_st.time/60
time_std_3b_p_st = kernel_std_3b_p_st.seconds + kernel_std_3b_p_st.microseconds/1000000
temp_std_3b_p_st = (kernel_std_3b_p_st.cpu_temp + kernel_std_3b_p_st.gpu_temp)/2
title = "Raspberry Pi 3 Model B+\nusing Stardard Raspbian Kernel 4.19.57-v7+\n(Queens: 12, Threads: 1, Iterations: 45)"
plot_data(timestamp_std_3b_p_st[:45], time_std_3b_p_st[:45], temp_std_3b_p_st[:45], (65, 174, 58, 67), title)
print("Time to 45 iterations: %.2f" %timestamp_std_3b_p_st[44])
# multi-thread vs single-thread
mt_timing_std_4b = (time_std_4b_st[:44,None]/time_std_4b_mt[:44,None])
mt_timing_std_3b_p = time_std_3b_p_st[:44]/time_std_3b_p_mt[:44] 

print("Multi-thread 4B: %.2f | Multi-thread 3B+: %.2f" % (np.mean(mt_timing_std_4b), np.mean(mt_timing_std_3b_p)))
print("Multi-thread 4B: %.2f | Multi-thread 3B+: %.2f" % (np.mean(time_std_4b_mt), np.mean(time_std_3b_p_mt)))
# model 4B vs B+ single- multi-thread
mt_timing_std_4b_vs_3b_p = time_std_3b_p_mt[:99]/time_std_4b_mt[:99]
st_timing_std_4b_vs_3b_p = time_std_3b_p_st[:44]/time_std_4b_st[:44]

print("Multi-thread: %.2f | Single-thread B: %.2f" % (np.mean(mt_timing_std_4b_vs_3b_p), np.mean(st_timing_std_4b_vs_3b_p)))
print("Multi-thread B+: %.2f | Multi-thread B: %.2f" % (np.mean(time_std_4b_st), np.mean(time_std_3b_p_st)))
max_std_mt_4b_temp = np.max(temp_std_4b_mt)
max_std_mt_3b_p_temp = np.max(temp_std_3b_p_mt)

max_std_st_4b_temp = np.max(temp_std_4b_st)
max_std_st_3b_p_temp = np.max(temp_std_3b_p_st)

print("Max. temp. %.2f | Max. temp. %.2f" % (max_std_mt_4b_temp, max_std_mt_3b_p_temp))
print("Max. temp. %.2f | Max. temp. %.2f" % (max_std_st_4b_temp, max_std_st_3b_p_temp))<jupyter_output>Max. temp. 81.40 | Max. temp. 77.63
Max. temp. 67.09 | Max. temp. 60.39
{'fraction_non_alphanumeric': 0.12861593235425012, 'fraction_numerical': 0.07454383622607921, 'mean_word_length': 7.232600732600733, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '326173', 'license': 'Apache-2.0', 'n_tokens_mistral': 2197, 'n_tokens_neox': 2032, 'n_words': 316, 'path': 'performance_test_standard_kernels_rpi_3Bp_4B.ipynb', 'repo_name': 'lemariva/rPI-Tests', 'size': '4494'}