Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-142927: Tachyon: Fix singular and plurals#145329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
pablogsal merged 1 commit intopython:mainfromhugovk:3.15-tachyon-plurals
Feb 28, 2026
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletionLib/profiling/sampling/sample.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -164,7 +164,8 @@ def sample(self, collector, duration_sec=None, *, async_aware=False):
# Don't print stats for live mode (curses is handling display)
is_live_mode = LiveStatsCollector is not None and isinstance(collector, LiveStatsCollector)
if not is_live_mode:
print(f"Captured {num_samples:n} samples in {fmt(running_time_sec, 2)} seconds")
s = "" if num_samples == 1 else "s"
print(f"Captured {num_samples:n} sample{s} in {fmt(running_time_sec, 2)} seconds")
print(f"Sample rate: {fmt(sample_rate, 2)} samples/sec")
print(f"Error rate: {fmt(error_rate, 2)}")

Expand Down
8 changes: 6 additions & 2 deletionsLib/profiling/sampling/stack_collector.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -144,9 +144,13 @@ def export(self, filename):
num_functions = len(flamegraph_data.get("children", []))
total_time = flamegraph_data.get("value", 0)
string_count = len(self._string_table)
s1 = "" if num_functions == 1 else "s"
s2 = "" if total_time == 1 else "s"
s3 = "" if string_count == 1 else "s"
print(
f"Flamegraph data: {num_functions} root functions, total samples: {total_time}, "
f"{string_count} unique strings"
f"Flamegraph data: {num_functions} root function{s1}, "
f"{total_time} total sample{s2}, "
f"{string_count} unique string{s3}"
Comment on lines +151 to +153
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This was:

Flamegraph data: X root functions, total samples: Y, Z unique strings

I also changed the order of the middle one for consistency:

Flamegraph data: X root functions, Y total samples, Z unique strings

)

if num_functions == 0:
Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp