Skip to content

Commit 8711e95

Browse files
quic-rishinrqcdipankar
authored andcommitted
Removed git workflow and email test changes (#836)
Removed git workflow and email test changes as we are moving to Jenkin based approach --------- Signed-off-by: Rishin Raj <rishinr@qti.qualcomm.com> Signed-off-by: Dipankar Sarkar <dipankar@qti.qualcomm.com>
1 parent 7c98a32 commit 8711e95

File tree

4 files changed

+87
-183
lines changed

4 files changed

+87
-183
lines changed

.github/workflows/daily-pr-report.yml

Lines changed: 0 additions & 155 deletions
This file was deleted.

scripts/git_workflow/email_map.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

scripts/pr_report/__init__.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# -----------------------------------------------------------------------------
2+
#
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
# -----------------------------------------------------------------------------
7+
8+
"""
9+
QEfficient Memory Profiling
10+
11+
A production-ready memory profiling solution specifically designed for QEfficient workflows.
12+
Provides manual operation marking, comprehensive metrics collection, and professional visualization.
13+
14+
Usage Example:
15+
16+
```python
17+
from scripts.memory_profiling import QEffMemoryProfiler
18+
19+
profiler = QEffMemoryProfiler(verbose=True)
20+
profiler.start_monitoring()
21+
# ... your QEfficient code ...
22+
profiler.stop_monitoring()
23+
print(profiler.get_memory_report())
24+
profiler.generate_memory_graph()
25+
```
26+
"""
27+
28+
# Core profiler components
29+
from .profiler import (
30+
MetricsCollector,
31+
ProfilerConfig,
32+
ProfileSample,
33+
QEffMemoryProfiler,
34+
)
35+
36+
# Visualization component (imported on-demand)
37+
try:
38+
from .visualizer import QEffMemoryVisualizer
39+
except ImportError:
40+
# Handle case where matplotlib is not available
41+
QEffMemoryVisualizer = None
42+
43+
__all__ = [
44+
"QEffMemoryProfiler",
45+
"ProfilerConfig",
46+
"ProfileSample",
47+
"MetricsCollector",
48+
"QEffMemoryVisualizer",
49+
]
Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
#!/usr/bin/env python3
1+
# -----------------------------------------------------------------------------
2+
#
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
#
6+
# -----------------------------------------------------------------------------
7+
28
"""
39
Daily PR report generator.
410
@@ -265,24 +271,36 @@ def generate_pie_chart_svg(author_counts):
265271

266272
# 15-colour palette; cycles if there are more authors
267273
colors = [
268-
"#4a90d9", "#e74c3c", "#2ecc71", "#f39c12", "#9b59b6",
269-
"#1abc9c", "#e67e22", "#3498db", "#e91e63", "#00bcd4",
270-
"#ff5722", "#607d8b", "#795548", "#9c27b0", "#4caf50",
274+
"#4a90d9",
275+
"#e74c3c",
276+
"#2ecc71",
277+
"#f39c12",
278+
"#9b59b6",
279+
"#1abc9c",
280+
"#e67e22",
281+
"#3498db",
282+
"#e91e63",
283+
"#00bcd4",
284+
"#ff5722",
285+
"#607d8b",
286+
"#795548",
287+
"#9c27b0",
288+
"#4caf50",
271289
]
272290

273-
cx, cy, r = 190, 190, 160 # pie centre and radius
274-
legend_x = cx * 2 + 30 # legend column starts here
275-
row_h = 22 # legend row height
276-
svg_w = legend_x + 260 # total SVG width
277-
svg_h = max(cy * 2, len(items) * row_h + 50) # total SVG height
291+
cx, cy, r = 190, 190, 160 # pie centre and radius
292+
legend_x = cx * 2 + 30 # legend column starts here
293+
row_h = 22 # legend row height
294+
svg_w = legend_x + 260 # total SVG width
295+
svg_h = max(cy * 2, len(items) * row_h + 50) # total SVG height
278296

279297
# ── Build slice paths ────────────────────────────────────────────────────
280298
paths_svg = ""
281299
legend_svg = ""
282-
start_angle = -math.pi / 2 # begin at 12 o'clock
300+
start_angle = -math.pi / 2 # begin at 12 o'clock
283301

284302
for i, (author, count) in enumerate(items):
285-
angle = 2 * math.pi * count / total
303+
angle = 2 * math.pi * count / total
286304
end_angle = start_angle + angle
287305

288306
x1 = cx + r * math.cos(start_angle)
@@ -291,20 +309,16 @@ def generate_pie_chart_svg(author_counts):
291309
y2 = cy + r * math.sin(end_angle)
292310

293311
large_arc = 1 if angle > math.pi else 0
294-
color = colors[i % len(colors)]
295-
pct = count / total * 100
312+
color = colors[i % len(colors)]
313+
pct = count / total * 100
296314

297315
# SVG arc path: move to centre → line to arc start → arc → close
298-
path = (
299-
f"M {cx},{cy} "
300-
f"L {x1:.2f},{y1:.2f} "
301-
f"A {r},{r} 0 {large_arc},1 {x2:.2f},{y2:.2f} Z"
302-
)
316+
path = f"M {cx},{cy} L {x1:.2f},{y1:.2f} A {r},{r} 0 {large_arc},1 {x2:.2f},{y2:.2f} Z"
303317
paths_svg += (
304318
f' <path d="{path}" fill="{color}" '
305319
f'stroke="white" stroke-width="2">\n'
306-
f' <title>{author}: {count} PR{"s" if count != 1 else ""} ({pct:.1f}%)</title>\n'
307-
f' </path>\n'
320+
f" <title>{author}: {count} PR{'s' if count != 1 else ''} ({pct:.1f}%)</title>\n"
321+
f" </path>\n"
308322
)
309323

310324
# Legend row
@@ -314,8 +328,8 @@ def generate_pie_chart_svg(author_counts):
314328
f'fill="{color}" rx="2"/>\n'
315329
f' <text x="{legend_x + 20}" y="{ly + 11}" '
316330
f'font-size="12" font-family="Arial, sans-serif" fill="#333">'
317-
f'{author} {count} PR{"s" if count != 1 else ""} ({pct:.1f}%)'
318-
f'</text>\n'
331+
f"{author} {count} PR{'s' if count != 1 else ''} ({pct:.1f}%)"
332+
f"</text>\n"
319333
)
320334

321335
start_angle = end_angle
@@ -329,15 +343,14 @@ def generate_pie_chart_svg(author_counts):
329343
# Chart title
330344
f' <text x="{cx}" y="20" text-anchor="middle" '
331345
f'font-size="14" font-weight="bold" fill="#1a1a2e">'
332-
f'PR Distribution by Author (Total: {total})</text>\n'
346+
f"PR Distribution by Author (Total: {total})</text>\n"
333347
# Slices
334348
+ paths_svg
335349
# Legend header
336350
+ f' <text x="{legend_x}" y="22" font-size="13" '
337351
f'font-weight="bold" fill="#1a1a2e">Author</text>\n'
338352
# Legend rows
339-
+ legend_svg
340-
+ '</svg>\n</div>\n'
353+
+ legend_svg + "</svg>\n</div>\n"
341354
)
342355
return svg
343356

0 commit comments

Comments
 (0)