Summarize data

Please, check my code!
I forgot to include some kind of readme.st. To test custom command:
python manage.py summarize [date YYYY-MM-DD] [--nodeletion]
If you pass no parameters it summarizes current date minus 15 days (single day and no a 15-days period)
I agree. Changed.

On Sat, Oct 4, 2014 at 2:26 AM, Fidel Ramos <notifications@github.com>
wrote:

> In okapiweb/requestinfo/views.py:
>
> > +            total_response = len(same_name_hosts_list)
> > +            for single_host in same_name_hosts_list:
> > +                time_list.append(single_host.response_time)
> > +                if 400 <= single_host.status_code <= 499:
> > +                    status_4xx += 1
> > +                elif 500 <= single_host.status_code <= 599:
> > +                    status_5xx += 1
> > +                elif single_host.status_code is None:
> > +                    status_none += 1
> > +
> > +            time = average(time_list)
> > +            for project_name in hosts.keys():
> > +                # add data only if host belongs to the project!
> > +                if host in hosts_dict[project_name]:
> > +                    project_list.append(
> > +                        determine_speed(project_name, status_4xx, status_5xx, status_none, time, total_response))
>
> I think this is more readable:
>
> speed = determine_speed(project, status_4xx, status_5xx,
>                         status_none, avg_time, total_response)project_list.append(speed)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/redbeacon/okapi-web/pull/23/files#r18426023>.
>



-- 
Alejandro Garcia
Software Engineer at RedBeacon.com