Some projects won't respond to rest API ../rest/stats/proj/%s/iter/%s?word=true

Description

Hi there,

Some project will never answer rest request to have the statistics of one iteration
The URL is as following, where the 1st %s is the project name and the 2nd, the project iteration :
https://fedora.zanata.org/rest/stats/proj/%s/iter/%s?word=true

This match with documentation : https://zanata.ci.cloudbees.com/job/zanata-api-site/site/zanata-common-api/rest-api-docs/ns0_translationStatistics.html

You can reproduce this bug using the following code :
https://github.com/Jibec/fedora-zanata-statistics

Thanks for your help !

Activity

Show:
j
April 4, 2016, 12:08 PM

I'll try to rewrite it in bash, but I'm pretty sure it's not threads related as I don't know how to use it in python .

Did you run the python script on your desktop ? Do you have the same issue or everything went fine ?
You just have to create a result folder and run "python3 myscript.py"

Carlos Munoz
April 4, 2016, 11:36 PM
Edited

I think I managed to reproduce it

Even when doing curl 'https://fedora.zanata.org/rest/stats/proj/man-pages-l10n/iter/3.70_2?word=true' I get a very slow response.

The problem here is with very large completely untranslated projects. We have seen this in the past and we have been planning a redo of our statistics calculation mechanism. I think this bug is just one reason to move that forward.

j
November 6, 2016, 7:12 AM

any progress in that subject?

Carlos Munoz
November 7, 2016, 12:19 AM

Hi Jean-Baptiste, no progress as of now, but let me try to get some attention from

Alex, is there anything we can do as a workaround perhaps to identify when stats are empty and hence return a quicker response? what other solutions can we think about while we reimagine the stats subsystem?

Alex Eng
November 9, 2016, 10:01 PM

We can visit the algorithms used for this stats and see if we can improve the performance. As Carlos mentioned, we've seen this in the past. I will change the priority for this bug.

Assignee

Unassigned

Reporter

j

Labels

Tested Version/s

None

Components

Sprint

None

Fix versions

Affects versions

Priority

Medium
Configure