Pre-heat the sous vide water bath to 139°F. Season all sides of the pork tenderloin with salt and freshly ground black pepper.
Combine the olive oil, garlic, half of your shallot allotment, lemon juice in a bowl and then pour it into a freezer zipper-sealable plastic bag. Add the pork tenderloin and massage it to coat it well with the marinade. Place the rosemary and thyme sprigs around the sides of the tenderloin. Remove as much of the air as possible from the bag by submerging the bag in the water up to the zipper seal (don’t let any water into the bag), and allowing the water to displace the air in the bag. Seal the bag and drop it into the water bath.
Cook the pork in the sous vide bath for at least 1 hour, or as long as 4 hours. I prefer 2 hours.
Remove the pork tenderloin from the bag and dry it lightly with clean paper towels. Discard the rosemary sprigs, but reserve the cooking juices in the bag.
Preheat a cast iron pan over medium-high heat. Add a little olive oil, some thyme, rosemary and the shallots to the pan and sear the pork tenderloin on all sides until nicely browned. Transfer the tenderloin to a cutting board, cover with foil and let it rest for 5-10 minutes.
Pour the reserved cooking juices into the cast iron pan and bring to a simmer. Reduce the sauce for a few minutes until it has thickened. Add the chopped rosemary and season to taste. Slice the pork tenderloin and transfer the slices to a serving platter. Pour the sauce on top. Garnish with fresh rosemary and thyme sprigs.
5 minutes before your pork is done cooking, combine the maple syrup, vinegar, and red pepper flakes in a small saucepan. Turn the heat to high and boil for about 3 minutes, until the mixture has reduced to 1/3 of a cup. Turn off the heat and whisk in the dijon mustard.