Krispy Kreme Doughnuts (KKD) weighed in with a second-quarter beat on both profit and revenue, prompting the shares to jump more than 3% in after-hours trading.

The confectioner posted net income of $8.84 million, or 12 cents a share, which includes a non-recurring gain of 6 cents a share, due to the sale of its 30% equity interest in KK Mexico. That compares to year-ago profit of $2.2 million or 3 cents a share.

Revenue rose 11% to $98 million, compared with last years revenue of $87.9 million. Same-store sales rose for the eleventh consecutive quarter to 2.5% at company stores, compared with a year-ago same-store sale increase of 5.7%.

Analysts polled by Thomson Reuters had predicted earnings of 6 cents on revenue of $92.26 million.

We generated double-digit revenue growth in each of our business segments, doubled earnings per share excluding a nonrecurring gain of $0.06, and expanded the Krispy Kreme system with a net 17 new stores, James H. Morgan, President and Chief Executive Officer, in a statement. Moreover, our results were generated in the face of higher agricultural commodity prices, extreme temperatures, and much higher gas prices compared to the year ago period.

The doughnut-chain backed its fiscal 2012 forecast for consolidated operating income between $22 million and $24 million, and believes the high end of that range is achievable.

Revenue increased in each of the companys four business segments, compared to the year-ago quarter. Revenues from company stores rose 10% to $66 million, as domestic franchise revenues rose 13.3% to $2.3 million. International franchise revenues rose 33.5% to $5.4 million, and KK supply chain revenues improved 12.1% to $50.3 million, due to increases in selling price.

The company ended the quarter with a total of 669 stores, an increase of 17 Krispy Kreme stores during the quarter.

Shares of Krispy Kreme fell 4 cents in Thursdays session, closing the day at $7.84 a share; the stock was up 16 cents or 2% in after-hours trading. Year-to-date, Krispy Kreme is up 12.32%.