logiguard fork v2: patched GPUI on verified 8c74db0 tree

Rebuilt from the exact zed-industries/zed @ 8c74db00c4053d6c0a9037863d7bd048658da4ca
tree (previous orphan was based on a stale/wrong fetch). Same 3-file patch:
  - serial.rs: add SerialKind::KeyboardEnter
  - client.rs: store wl_keyboard.enter serial; add latest_serial_of()
  - window.rs: activate() uses keyboard-enter serial (Mutter focus gate)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Mohamad Khani
2026-07-14 01:44:22 +03:30
co-authored by Claude Fable 5
commit 46c7879954
3984 changed files with 1487015 additions and 0 deletions
+74
View File
@@ -0,0 +1,74 @@
#!/usr/bin/env python3
# Required dependencies for this script:
#
# pandas: For data manipulation and analysis.
# matplotlib: For creating static, interactive, and animated visualizations in Python.
# seaborn: For making statistical graphics in Python, based on matplotlib.
# To install these dependencies, use the following pip command:
# pip install pandas matplotlib seaborn
# This script is designed to parse log files for performance measurements and create histograms of these measurements.
# It expects log files to contain lines with measurements in the format "measurement: timeunit" where timeunit can be in milliseconds (ms) or microseconds (µs).
# Lines that do not contain a colon ':' are skipped.
# The script takes one or more file paths as command-line arguments, parses each log file, and then combines the data into a single DataFrame.
# It then converts all time measurements into milliseconds, discards the original time and unit columns, and creates histograms for each unique measurement type.
# The histograms display the distribution of times for each measurement, separated by log file, and normalized to show density rather than count.
# To use this script, run it from the command line with the log file paths as arguments, like so:
# python this_script.py log1.txt log2.txt ...
# The script will then parse the provided log files and display the histograms for each type of measurement found.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import sys
def parse_log_file(file_path):
data = {'measurement': [], 'time': [], 'unit': [], 'log_file': []}
with open(file_path, 'r') as file:
for line in file:
if ':' not in line:
continue
parts = line.strip().split(': ')
if len(parts) != 2:
continue
measurement, time_with_unit = parts[0], parts[1]
if 'ms' in time_with_unit:
time, unit = time_with_unit[:-2], 'ms'
elif 'µs' in time_with_unit:
time, unit = time_with_unit[:-2], 'µs'
else:
# Print an error message if we can't parse the line and then continue with rest.
print(f'Error: Invalid time unit in line "{line.strip()}". Skipping.', file=sys.stderr)
continue
data['measurement'].append(measurement)
data['time'].append(float(time))
data['unit'].append(unit)
data['log_file'].append(file_path.split('/')[-1])
return pd.DataFrame(data)
def create_histograms(df, measurement):
filtered_df = df[df['measurement'] == measurement]
plt.figure(figsize=(12, 6))
sns.histplot(data=filtered_df, x='time_ms', hue='log_file', element='step', stat='density', common_norm=False, palette='bright')
plt.title(f'Histogram of {measurement}')
plt.xlabel('Time (ms)')
plt.ylabel('Density')
plt.grid(True)
plt.xlim(filtered_df['time_ms'].quantile(0.01), filtered_df['time_ms'].quantile(0.99))
plt.show()
file_paths = sys.argv[1:]
dfs = [parse_log_file(path) for path in file_paths]
combined_df = pd.concat(dfs, ignore_index=True)
combined_df['time_ms'] = combined_df.apply(lambda row: row['time'] if row['unit'] == 'ms' else row['time'] / 1000, axis=1)
combined_df.drop(['time', 'unit'], axis=1, inplace=True)
measurement_types = combined_df['measurement'].unique()
for measurement in measurement_types:
create_histograms(combined_df, measurement)