1. A method comprising: receiving a user selection of a performance metric of a computer system to optimize; starting, by a processor of a device, a multi-threaded application program on the device; creating, by the processor, a new thread in the multi-threaded application program; temporarily assigning, by the processor, the new thread to a cache according to each of a plurality of thread assignment rules; running, by the processor, the new thread according to each of the plurality of thread assignment rules for a fixed period of time; collecting performance metrics of the device based on the running of the new thread according to each of the plurality of thread assignment rules; determining, by the processor, which thread assignment rule of the plurality of thread assignment rules optimizes the user-selected performance metric based on the collected performance metrics of the device; and assigning, by the processor, the new thread to a cache according to the thread assignment rule that optimizes the user-selected performance metric.