Former Secretary of Defense Robert Gates made international news this week with the release of a memoir that serves up a big helping of unvarnished criticism of his former boss, President Obama.

But his scalding of the sitting commander in chief seems practically tame compared to the beat down he delivers to members of Congress.

And that includes Senate Majority Leader Harry Reid, who, Gates asserts, once urged him to have the Defense Department "invest in research on irritable bowel syndrome."

"With two ongoing wars and all our budget and other issues," Gates writes, "I didn't know whether to laugh or cry."

Mostly, however, what Gates does is rage against Congress in Duty: Memoirs of a Secretary at War.

"Congress," he opines, "is best viewed from a distance – the farther the better – because close up it is truly ugly."

Gates, who also served as defense secretary under President George W. Bush, swings broadly in an unbridled insult-fest in a late section of his book called "Reflections."

And he also goes narrow, picking a few members, like Reid and his Republican counterpart, Senate Minority Leader Mitch McConnell, for special attention.

Let's start with Gates' overall denunciation of Congress, which includes his suggestion that some may be in need of mental health services:

On his view of the majority of the United States Congress

"...uncivil, incompetent in fulfilling basic constitutional responsibilities, micro-managerial, parochial, hypocritical, egotistical, thin-skinned, often putting self (and reelection) before country...."

On the 'kangaroo-court environment' in hearings

"Sharp questioning of witnesses should be expected and is entirely appropriate. But rude, insulting, belittling, bullying and all too often highly personal attacks by members of Congress violated nearly every norm of civil behavior ... as though most members were in a permanent state of outrage or suffered from some sort of mental duress that warranted confinement or at least treatment for anger management ..."

On budget and program matters under President Obama

"I was more or less continuously outraged by the parochial self-interest of all but a very few members of Congress. Any defense facility or contract in their district or state, no matter how superfluous or wasteful, was sacrosanct."

Gates writes that he was frustrated by Congress' continuing failure to enact defense appropriations bills before the start of new fiscal years. It's nothing less than an "outrageous dereliction of duty," he says.

And he bemoaned the "weakening of the moderate center of both parties in Congress," as well as lack of comity he says has been exacerbated by three-day workweeks. The short weeks allow members to return often to their home districts but discourage socialization and friendships with Capitol Hill colleagues, he says.

Gates shares his thoughts on a handful of members of Congress, most of whom he characterizes as privately calm and thoughtful, but publicly something else entirely.

"When they went into an open hearing, and that little red light went on atop a television camera," he writes, "it had the effect of a full moon on a werewolf." Some, he said, without naming names, "became raving lunatics."

On Senate Majority Leader Harry Reid

The Nevada Democrat angered Gates in 2008, when debate was occurring over whether to extend the troop surge in Iraq, with comments the secretary of defense believe smacked of "defeatism."

"The worst of these comments came in mid-April from the Senate Majority Leader, Harry Reid, who said in a press conference, 'This war is lost,' and 'The surge is not accomplishing anything.' I was furious and shared privately with some of my staff a quote from Abraham Lincoln I had written down long before. 'Congressmen who willfully take actions during wartime that damage morale and undermine the military are saboteurs and should be arrested, exiled or hanged.' "

On the late Democratic Sen. Robert Byrd of West Virginia, chairman of the Senate Appropriations Committee during a 2007 war funding hearing

"An ancient and frail Senator Robert Byrd was in the chair. The hearing, supposedly about the defense budget was basically one more opportunity for the Democrats to vent on Iraq. Byrd took it to a whole new level. Like an evangelical tent preacher, he played to the crowd, engaged them, and enraged them, virtually encouraging the protesters to heckle Pete [Joint Chiefs Chairman Gen. Peter Pace] and me."I thought the whole thing had been comical – Saturday Night Live meets Congress."

On Democratic Sen. Carl Levin of Michigan, chairman of the Senate Armed Services Committee

"Levin was strongly partisan, and I thought some of his investigations were attempts to scapegoat my predecessor and others. But he always dealt fairly and honestly with me, always keeping his word."

On Republican Sen. John McCain of Arizona, member of the Senate Armed Services Committee

"Prickly to deal with. During one hearing he might be effusive in his praise, and in the next, he would be chewing my ass over something."

On Republican Senate Minority Leader Mitch McConnell of Kentucky (and others)

"I came to believe that virtually all members of Congress carried what I called a 'wallet list'... so that if, by chance, they might run into me or talk with me on the phone, they had a handy list of local projects and programs to push forward. And some became pretty predictable."

Gates' list of predictable asks from members of Congress:

McConnell: Make sure a chemical weapons disposal plant in his state was fully funded.Maine or Mississippi elected officials: shipyardsCalifornia: C-17 cargo planesKansas, Washington, Alabama: new Air Force tankerTexas: "When were the brigades coming back from Europe and would they go to Fort Bliss?"

It was enough to make a secretary of defense want to quit — and, indeed, Gates says he often toyed with that possibility.

"All too frequently, sitting at that witness table, the exit lines were on the tip of my tongue: I may be the secretary of defense, but I am also an American citizen, and there is no son of a bitch in the world who can talk to me like that. I quit. Find somebody else."Copyright 2016 NPR. To see more, visit http://www.npr.org/.