Closed Bug 895998 Opened 11 years ago Closed 11 years ago

Jenkins tests are slow

Categories

(Socorro :: Infra, task)

x86
macOS
task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lonnen, Assigned: peterbe)

References

Details

(Whiteboard: [qa-])

Needs some investigation, but I bet we can get a 30% speedup without too much trouble.
QA Contact: chris.lonnen
Depends on: 896000
Would be nice to more effectively re-use the virtualenv, e.g. don't recreate the whole thing on "make install", just reuse the once we build before. Maybe just by fixing bug 871798
I see this a lot::

```
...

----------------------------------------------------------------------
Ran 185 tests in 48.230s

OK
nosetests --verbosity 1 --with-xunit
Creating test database for alias 'default'...
Tests finished.
FIN
# alias to webapp-django
Running integration test...
INFO: setting up environment... Done.
INFO: setting up database... Done.
INFO: configuring backend jobs... Done.
INFO: starting up collector, processor, monitor and middleware... Done.
INFO: collector test passed
...
```

After it says "Tests finished", there's a delay in tens of minutes till it says "Running integration test..." and "INFO: setting up environment... Done." etc. 

I get a feeling that running the socorro and the webapp-django tests takes about 1-2% of the time it takes to run the whole script. The rest of the time is spent in pip and majority is in executing the integration tests. 


I suspect
(In reply to Peter Bengtsson [:peterbe] from comment #2)
> I see this a lot::
> 
> ```
> ...
> 
> ----------------------------------------------------------------------
> Ran 185 tests in 48.230s
> 
> OK
> nosetests --verbosity 1 --with-xunit
> Creating test database for alias 'default'...
> Tests finished.
> FIN
> # alias to webapp-django
> Running integration test...
> INFO: setting up environment... Done.
> INFO: setting up database... Done.
> INFO: configuring backend jobs... Done.
> INFO: starting up collector, processor, monitor and middleware... Done.
> INFO: collector test passed
> ...
> ```
> 
> After it says "Tests finished", there's a delay in tens of minutes till it
> says "Running integration test..." and "INFO: setting up environment...
> Done." etc. 
> 
> I get a feeling that running the socorro and the webapp-django tests takes
> about 1-2% of the time it takes to run the whole script. The rest of the
> time is spent in pip and majority is in executing the integration tests. 
> 
> 
> I suspect

Rerunning pip is definitely a problem (not the only one), see comment 1
Here's what I get on my fancy macbook with SSD:

$ time ./scripts/monitor-integration-test.sh --destroy
INFO: setting up environment... Done.
INFO: setting up database...ERROR: setupdb_app.py failed, check setupdb.log
INFO: cleaning up crash storage directories
INFO: Terminating background jobs
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

real	1m24.508s
user	0m46.775s
sys	0m8.921s





$ time ./scripts/rabbitmq-integration-test.sh --destroy
INFO: setting up environment... Done.
INFO: setting up database...ERROR: setupdb_app.py failed, check setupdb.log
INFO: Purging rabbitmq queue
INFO: cleaning up crash storage directories
INFO: Terminating background jobs
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

real	2m18.522s
user	0m46.369s
sys	0m8.754s


I don't have elasticsearch on my laptop.
Curious if this is going to help
https://github.com/mozilla/socorro/pull/1412
Commit pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/231f91563347b4b172e5fb601bb23b2994be3647
fixes bug 895998 - lots of timings and removed pip flag --ignore-installed, r=lonnen
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Closed because with removing the `--ignore-installed` it takes 5 minutes instead of 25-30 minutes. 

There might be more we can do later but for now, let's resolve this.
Whiteboard: [qa-]
Assignee: nobody → peterbe
Target Milestone: --- → 57
You need to log in before you can comment on or make changes to this bug.