For formal observations, how long does the administrator sit and watch? Is it the entire class period?

It depends on your district. In mine, the first observation must last 45 minutes (I think), and the other ones can be in the 10-15 minute range. All this is outlined in our teaching contract.

In my district the administrator stays for the entire hour so that he can observe all parts of the lesson.

As Caesar mentioned, it depends on your district. I was in a district where it was 40 minutes. Where I am at now it is 50 minutes which is the amount considered for a lesson by the admin.

In my district, the administrator stays in the room for the whole lesson during a formal observation, and for a simple walk through it can be under 10 mins.

We are required to have 2 formal "Compass" observations per year - our administrator has to observe the lesson for 1 hour.

45 minutes to an hour. Usually it is an entire class period plus some transition time to see how you move from class to class or period to period.

For our formal evaluations, the administrator observes two full periods--a total of at least 80 minutes--in two separate subject areas.

Formal observations are for the whole class period, however long that may be. I've worked with periods from 45 minutes to 100 minutes. Walkthroughs are 5-10 minutes.