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

Multiload network scale #301

Closed

Conversation

marosg42
Copy link
Contributor

@marosg42 marosg42 commented Jan 3, 2018

When network load gets over 100,000 bytes/s grid line is added and graph scales so that top of graph means 200,000 now. When 200,000 is reached, new line is added and 300,000 is top etc. Like loadavg graph.
Number 100,000 is configurable via schema file. To make it changable via gconf editor, it would need to change from relocatable schema, I will look at it as next stage.

Second commit only reformats the craziest cases of formatting, some parts of code were very hard to read due to bad indentation. I kept is as two commits so that code changes in first commit are easier to review.

@raveit65
Copy link
Member

raveit65 commented Jan 9, 2018

hmm,
i am seeing only white lines with normal panel size and using 100,000 bytes/s grid line.
I am using 50000kb/s max download from my provider.
So the 100,000 bytes/s value is to small.
But with using 165 px panel height it looks like it works.
I think we can't use it without a config option for setting up grid line values.

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

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

This seemed to work fine here, but I don't have a landline so really high data rates are not available. Also could only load it for a short time due to bandwidth issues.

@raveit65
Copy link
Member

The scalling works now and i see several grid lines with my bandwidth.
But does changing the color works now?
Or did i missed a hint from you at irc channel?

@raveit65
Copy link
Member

Really nice idea with the retangle.
And changing the color of the grid line is working again.

@marosg42 marosg42 force-pushed the multiload-network-scale branch 5 times, most recently from 2a41965 to 95259dc Compare January 27, 2018 22:26
@raveit65
Copy link
Member

...just final testing.
@sc0w @clefebvre @monsta
Would be nice to git this new feature in 1.20. So please test.

@raveit65
Copy link
Member

Very nice the options with the thresholds. I think some tooltip infos about the function of thresholds would be helpful.
All this needs translations so we can't push it with 1.20, but maybe with a point release when some translations are done.

@marosg42
Copy link
Contributor Author

I think I will rather update Help screen any objections?

@raveit65
Copy link
Member

Only a some help about the different thresholds.
I am not really sure if i understand this for myself.

multiload/main.c Outdated
{ _("Swap Load"), "swapload", 2, GetSwap },
{ _("Load Average"), "loadavg", 3, GetLoadAvg },
{ _("Disk Load"), "diskload", 3, GetDiskLoad }
};

gint speed, size;
guint net_granularity;
guint net_threshold1;
guint net_threshold2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, indent...

@@ -58,20 +59,20 @@ struct _LoadGraph {
struct _MultiloadApplet
{
MatePanelApplet *applet;

Copy link
Contributor

Choose a reason for hiding this comment

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

Pushed these cleanups as a separate commit

@@ -49,47 +49,48 @@ static const unsigned needed_netload_flags =
void
GetLoad (int Maximum, int data [5], LoadGraph *g)
{
int usr, nice, sys, iowait, free;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use 2 spaces instead of 4 everywhere...?

@@ -73,17 +73,10 @@ help_cb (GtkAction *action,

GError *error = NULL;

#if GTK_CHECK_VERSION (3, 22, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency it would be better to remove only the check blocks that were introduced earlier in this PR.
I'll add the PR which does it for the whole project later.

}

if (g->show_frame)
{
g->frame = gtk_frame_new (NULL);
Copy link
Contributor

Choose a reason for hiding this comment

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

Corrected some of these tab/space mix cases in master - you'll probably need to rebase

@marosg42 marosg42 force-pushed the multiload-network-scale branch 8 times, most recently from 58529f5 to ffb287f Compare February 3, 2018 16:37
@raveit65
Copy link
Member

raveit65 commented Feb 3, 2018

oh, now this branch have conflict :/

@marosg42 marosg42 force-pushed the multiload-network-scale branch 3 times, most recently from 7f1413c to bc19b58 Compare February 3, 2018 17:20
@raveit65
Copy link
Member

raveit65 commented Feb 3, 2018

@monsta
Huston we have a problem.
This branch cannot be rebased due to conflicts

@marosg42 marosg42 closed this Feb 4, 2018
@marosg42 marosg42 deleted the multiload-network-scale branch February 4, 2018 17:28
@marosg42
Copy link
Contributor Author

marosg42 commented Feb 4, 2018

Closed as agreed with raveit65, due to conflicts. New clean PR will be opened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants