Charles River Laboratories (NYSE:CRL) hasn't been the bearer of good tidings lately. While other large providers of drug researcher services like Covance (NYSE:CVD) and Pharmaceutical Product Development (NASDAQ:PPDI) have flourished, Charles River announced a restructuring last quarter.

These circumstances may help explain why the company's stock was up almost 12% in recent trading following the release of second-quarter results. With its recent troubled track record, investors were pleasantly surprised by the company's relatively good showing in the quarter. Still, it's not totally clear that Charles River is out of the woods.

The company disclosed that revenue from continuing operations for the quarter increased 6.8% year over year to $267.9 million. Earnings, meanwhile, came in at $0.46 per share, up 7% from the $0.43 reported in last year's second quarter. These results represent a significant improvement from the first quarter, when earnings were down year over year.

Even so, only half of Charles River's current business is actually performing well. Research Models and Services, which essentially sells designer rodents for use in experiments as well as related services, had flat sales and lower gross and operating margins. This business, which contributed 49% of sales in the quarter, has been stuck in neutral for several quarters and the company isn't expecting things to improve in the near term.

Admittedly, business in the preclinical segment was far better. Sales were up a robust 14.1% to $137 million and operating margin climbed to 16.4% from 15.5%. In yet more good news, the company expects to be operating at full capacity for the balance of the year, so margins should stay solid. However, there is a risk in this segment. Charles River intends to significantly expand preclinical capacity with two new facilities in the coming year. Any slowdown in the space could leave the company with lots of excess capacity, a development that would be bad news for margins.

Charles River is looking up after a rough patch, but celebration of its recovery may be a bit premature.

For more on Charles River:

Get all the inside information you need in our collection of investing newsletters . From wallflowerish small caps to swashbuckling Rule Breakers, we've got something for every investor. Get in on the action today; all of our newsletters offer a 30-day risk-free trial.

Fool contributor Brian Gorman does not own shares in any of the companies mentioned.