Closed Bug 1217520 Opened 9 years ago Closed 8 years ago

Improve speed of import_perf_data script using bulk_create

Categories

(Tree Management :: Perfherder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: vakila, Mentored)

Details

(Whiteboard: perfherder-starter-bug)

User Story

Thank you for helping out with Treeherder!

You can find us on IRC at irc://irc.mozilla.org/treeherder

Here's some links to help get you started.

Project page:
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder

Interacting with us, repo locations and links to set up a development version of the software:
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Contributing
https://wiki.mozilla.org/Auto-tools/Projects/Treeherder#Source_and_Docs

A-Team general reference, coding style guides:
https://ateam-bootcamp.readthedocs.org

Attachments

(1 file)

We have a command in perfherder for importing performance data from an existing instance of treeherder/perfherder. The import_perf_data script in perfherder's speed could be improved if we inserted the performance datum objects in bulk.

You can see an example of where we used to do this here in a deprecated migration script:

https://github.com/mozilla/treeherder/blob/066f437ca52b8833b5178eb68a7f2d2480f97574/treeherder/perf/management/commands/migrate_perf_data.py#L92

The file you want to modify is `treeherder/perf/management/commands/import_perf_data.py`. Specifically around here:

https://github.com/mozilla/treeherder/blob/master/treeherder/perf/management/commands/import_perf_data.py#L66

To test your change, set up a development instance of treeherder per the user story, then from vagrant ssh, run:

./manage.py import_reference_data  # required to view performance data
./manage.py import_perf_data --interval 2592000 --filter-props suite:tcheck2 mozilla-central
I'd like to mentor this bug. If you're not new to treeherder/perfherder, please don't take this. :) It's meant to be a simple launching off point to doing further treeherder development.
Mentor: wlachance
Whiteboard: perfherder-starter-bug
Attachment #8731799 - Flags: review?(wlachance)
Keywords: autoland
Comment on attachment 8731799 [details] [review]
[treeherder] vakila:perf-data-bulk > mozilla:master

Looks great now, thanks!
Attachment #8731799 - Flags: review?(wlachance) → review+
Keywords: autoland
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: