You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by gtenev <gi...@git.apache.org> on 2016/11/30 06:12:18 UTC
[GitHub] trafficserver pull request #1239: TS-5069 enhance logstats to report stats p...
GitHub user gtenev opened a pull request:
https://github.com/apache/trafficserver/pull/1239
TS-5069 enhance logstats to report stats per user
Enhanced `traffic_logstats` to aggregate and report stats per user instead of per host.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gtenev/trafficserver TS-5069
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/1239.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1239
----
commit b6b660ef1589e9c78e5f3121986205b3c75850a4
Author: Gancho Tenev <gt...@gmail.com>
Date: 2016-11-30T05:55:21Z
TS-5069 enhance logstats to report stats per user
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1226/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1229/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1131/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by gtenev <gi...@git.apache.org>.
Github user gtenev commented on the issue:
https://github.com/apache/trafficserver/pull/1239
@zwoop no problems, should be good now
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request #1239: TS-5069 enhance logstats to report stats p...
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/1239#discussion_r90557544
--- Diff: proxy/logstats.cc ---
@@ -594,15 +594,16 @@ struct CommandLineArgs {
int64_t min_hits;
int max_age;
int line_len;
- int incremental; // Do an incremental run
- int tail; // Tail the log file
- int summary; // Summary only
- int json; // JSON output
- int cgi; // CGI output (typically with json)
- int urls; // Produce JSON output of URL stats, arg is LRU size
- int show_urls; // Max URLs to show
- int as_object; // Show the URL stats as a single JSON object (not array)
- int concise; // Eliminate metrics that can be inferred by other values
+ int incremental; // Do an incremental run
+ int tail; // Tail the log file
+ int summary; // Summary only
+ int json; // JSON output
+ int cgi; // CGI output (typically with json)
+ int urls; // Produce JSON output of URL stats, arg is LRU size
+ int show_urls; // Max URLs to show
+ int as_object; // Show the URL stats as a single JSON object (not array)
+ int concise; // Eliminate metrics that can be inferred by other values
+ bool report_per_user; // A flag to aggregate and report stats per user instead of per host if 'true' (default 'false')
--- End diff --
I'm ok with this, but if we use bool here, we should use bool for the others too (that are bool). The reason I initially had it as "int" (i think) was because I assumed the parser needed the pointer to an int and not a bool. If it's safe and ok to use bool there, we should switch consistently. So, these
```
-A, --as_object tog false Produce URL stats as a JSON object instead of array
-C, --concise tog false Eliminate metrics that can be inferred from other values
-i, --incremental tog false Incremental log parsing
-s, --summary tog false Only produce the summary
-j, --json tog false Produce JSON formatted output
-c, --cgi tog false Produce HTTP headers suitable as a CGI
-r, --report_per_user tog false Report stats per user instead of host
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1132/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1123/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1228/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request #1239: TS-5069 enhance logstats to report stats p...
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/1239#discussion_r90559251
--- Diff: proxy/logstats.cc ---
@@ -1164,16 +1167,64 @@ update_schemes(OriginStats *stat, int scheme, int size)
}
///////////////////////////////////////////////////////////////////////////////
+// Finds or creates a stats structures if missing
+OriginStats *
+find_or_create_stats(const char *key)
+{
+ OriginStats *o_stats = NULL;
+ OriginStorage::iterator o_iter;
+ char *o_server = NULL;
+
+ // TODO: If we save state (struct) for a run, we probably need to always
+ // update the origin data, no matter what the origin_set is.
--- End diff --
Did you file a Jira on this?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop commented on the issue:
https://github.com/apache/trafficserver/pull/1239
I landed my changes, so now you have to resolve the conflicts. Sorry bro. :)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1122/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
Linux build *successful*! See https://ci.trafficserver.apache.org/job/Github-Linux/1119/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver issue #1239: TS-5069 enhance logstats to report stats per user
Posted by atsci <gi...@git.apache.org>.
Github user atsci commented on the issue:
https://github.com/apache/trafficserver/pull/1239
FreeBSD build *successful*! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1237/ for details.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request #1239: TS-5069 enhance logstats to report stats p...
Posted by zwoop <gi...@git.apache.org>.
Github user zwoop closed the pull request at:
https://github.com/apache/trafficserver/pull/1239
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---