Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-analyze: use Table #13062

Merged
merged 7 commits into from
Jul 16, 2019
Merged

systemd-analyze: use Table #13062

merged 7 commits into from
Jul 16, 2019

Conversation

yuwata
Copy link
Member

@yuwata yuwata commented Jul 15, 2019

No description provided.

@yuwata yuwata added the analyze label Jul 15, 2019
@@ -1081,18 +1080,50 @@ static int analyze_blame(int argc, char *argv[], void *userdata) {
if (n <= 0)
return n;

typesafe_qsort(times, n, compare_unit_time);
table = table_new("TIME", "UNIT");
Copy link
Member

Choose a reason for hiding this comment

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

we should probably stick to lowercase table header fields, as the formatter uppercases them anyway, and this way the JSON output of the formatter is nicer as it uses the table header fields 1:1 for the json output.

also see:

#13075

Copy link
Member

Choose a reason for hiding this comment

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

Let's do this in a later patch. There's already code in src/network that uses uppercase, so we should fix them all in one swell swoop.

I noticed some minor issues with formatting when reviewing this PR, but they predate the PR. I'll submit fixes separately.

@keszybz keszybz merged commit 0f18289 into systemd:master Jul 16, 2019
@yuwata yuwata deleted the analyze-use-table branch July 16, 2019 11:29
keszybz added a commit to keszybz/systemd that referenced this pull request Jul 16, 2019
systemd#13062 (comment)
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.
@keszybz keszybz mentioned this pull request Jul 16, 2019
@poettering
Copy link
Member

I have posted #13074 inspired by this btw, which should allows to make putting tables together quite a bit shorter. ptal

keszybz added a commit to keszybz/systemd that referenced this pull request Jul 16, 2019
systemd#13062 (comment)
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.
zachsmith pushed a commit to zachsmith/systemd that referenced this pull request Jul 26, 2019
systemd#13062 (comment)
> the formatter uppercases them anyway, and this way the JSON output of the
> formatter is nicer as it uses the table header fields 1:1 for the json
> output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants