This file is indexed.

/usr/share/GNUstep/Documentation/Performance/GSThroughput.html is in libperformance-dev 0.5.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>GSThroughput class documentation</title>
  </head>
  <body>
    <font face="serif">
    <h1><a name="title$GSThroughput">GSThroughput class documentation</a></h1>
    <h3>Authors</h3>
    <dl>
      <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt>
      <dd>
      </dd>
    </dl>
    <p><b>Version:</b> 33278</p>
    <p><b>Date:</b> 2011-06-11 15:41:59 +0100 (Sat, 11 Jun 2011)</p>
    <p><b>Copyright:</b> (C) 2005-2008 Free Software Foundation, Inc.</p>

        <div>
      <hr width="50%" align="left" />
      <h3>Contents -</h3>
      <ol>
        <li>
          <a href="#001000000000">Software documentation for the GSThroughput class</a>
        </li>
        <li>
          <a href="#002000000000">GSThroughput constants</a>
        </li>
      </ol>
      <hr width="50%" align="left" />
    </div>

          <h1><a name="001000000000">
        Software documentation for the GSThroughput class
      </a></h1>
    <h2><a name="class$GSThroughput">GSThroughput</a> : NSObject</h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>GSThroughput.h</dd>
      </dl>
    </blockquote>
    <div class="desc">
      
          
    </p>
    <p>

            The GSThroughput class is used maintain statistics
            about the number of events or the duration of
            operations in your software.
              </p>
    <p>
      
          
    </p>
    <p>

            For performance reasons, the class avoids locking and
            you must ensure that an instance of the class is only
            ever used by a single thread (the one in which it was
            created). You are responsible for ensuring that a
            run loop runs in each thread in which you use an
            instance, so that stats can be updated for that
            thread every second.
              </p>
    <p>
      
          
    </p>
    <p>

            You create an instance of the class for each
            event/operation that you are interested in
            monitoring, and you call the
            <a rel="gsdoc" href="#method$GSThroughput-add$">
              -add:
            </a>

            or
            <a rel="gsdoc" href="#method$GSThroughput-addDuration$">
              -addDuration:
            </a>

            method to record events. <br /> For duration
            logging, you may also use the
            <a rel="gsdoc" href="#method$GSThroughput-startDuration$">
              -startDuration:
            </a>

            and
            <a rel="gsdoc" href="#method$GSThroughput-endDuration">
              -endDuration
            </a>

            methods to handle adding of the amount of time
            taken between the two calls.
              </p>
    <p>
      
          
    </p>
    <p>

            To dump a record of the gathered statistics, you may
            call the
            <a rel="gsdoc" href="#method$GSThroughput-description">
              -description
            </a>

            method of an instance or the class
            <a rel="gsdoc" href="#method$GSThroughput+description">
              +description
            </a>

            method to dump statistics for all instances in the
            current thread. <br /> If you need to gather a
            record for all the threads you use, you must
            generate a dump in each thread and combine the
            results.
              </p>
    <p>
      
          
    </p>
    <p>

            To be notified of statistics at the end of each minute,
            you may call the
            <a rel="gsdoc" href="#method$GSThroughput-enableNotifications$">
              -enableNotifications:
            </a>

            method for an instance. The notifications are
            generated in the thread that instance belongs to.
              </p>
    <p>
      
        
    </div>
    <hr width="50%" align="left" />
    <a href="#_GSThroughput_ivars">Instance Variables</a>
    <br/><br/>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput+allInstances">+allInstances</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput+description">+description</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput+setTick$">+setTick:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput+tick">+tick</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-add$">-add:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-add$duration$">-add:duration:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-addDuration$">-addDuration:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-description">-description</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-enableNotifications$">-enableNotifications:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-endDuration">-endDuration</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-endDuration$">-endDuration:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-init">-init</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-initWithDurations$forPeriods$ofLength$">-initWithDurations:forPeriods:ofLength:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-name">-name</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-setName$">-setName:</a></li>
      <li><a rel="gsdoc" href="GSThroughput.html#method$GSThroughput-startDuration$">-startDuration:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$GSThroughput+allInstances">allInstances&nbsp;</a></h3>
    + (NSArray*) <b>allInstances</b>;<br />
    <div class="desc">
      
            Return all the current throughput measuring objects
            in the current thread. NB. This does not return
            instances from other threads.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput+description">description&nbsp;</a></h3>
    + (NSString*) <b>description</b>;<br />
    <div class="desc">
      
            Return a report on all GSThroughput instances in the
            current thread... <br /> This calls the
            <a rel="gsdoc" href="#method$GSThroughput-description">
              [GSThroughput -description]
            </a>

            method of the individual instances to get a report
            on each one. <br /> The results are ordered
            alphabetically by name of the instances (an
            instance without a name is treated as having an
            empty string as a name).
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput+setTick$">setTick:&nbsp;</a></h3>
    + (void) <b>setTick:</b> (BOOL)aFlag;<br />
    <div class="desc">
      
            Instructs the monitoring system to use a timer at
            the start of each second for keeping its idea of the
            current time up to date. This timer is used to call
            the <a rel="gsdoc" href="#method$GSThroughput+tick">+tick</a>
 method in
            the current thread. <br /> Passing a value of
            <code>NO</code> for <var>aFlag</var> will turn off
            the timer for the current thread. <br /> For the timer
            to work, the thread&apos;s runloop must be running. <br />
            Keeping the notion of the current time up to date
            is important for instances configured to record stats
            broken down over a number of periods, since the
            periodic breakdown must be adjusted each second.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput+tick">tick&nbsp;</a></h3>
    + (void) <b>tick</b>;<br />
    <div class="desc">
      
            Updates the monitoring system&apos;s notion of the
            current time for all instances associated with the
            current thread. <br /> This should be called at the
            start of each second (or more often) if you want an
            accurate breakdown of monitoring by the second.
            <br /> If you don&apos;t want to call this yourself, you
            can call
            <a rel="gsdoc" href="#method$GSThroughput+setTick$">
              +setTick:
            </a>

            to have it called automatically. <br /> If you are not
            using any instances of the class configured to
            maintain a breakdown of stats by periods, you do
            not need to call this method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-add$">add:&nbsp;</a></h3>
    - (void) <b>add:</b> (unsigned)count;<br />
    <div class="desc">
      
            Add to the <var>count</var> of the number of
            transactions for the receiver. <br /> You may
            use this method only if the receiver was initialised
            with duration logging turned off.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-add$duration$">add:&nbsp;duration:&nbsp;</a></h3>
    - (void) <b>add:</b> (unsigned)count<b> duration:</b> (NSTimeInterval)length;<br />
    <div class="desc">
      
            Adds a record for multiple events of the specified
            <em>total</em> duration. <br /> This is useful where
            you know a lot of similar events have completed in a
            particular period of time, but can&apos;t afford to
            measure the duration of the individual events
            because the timing overheads would be too great.
            <br /> You may use this method only if the receiver
            was initialised with duration logging turned on.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-addDuration$">addDuration:&nbsp;</a></h3>
    - (void) <b>addDuration:</b> (NSTimeInterval)length;<br />
    <div class="desc">
      
            Adds a record for a single event of the specified
            duration. <br /> You may use this method only if
            the receiver was initialised with duration logging
            turned on.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-description">description&nbsp;</a></h3>
    - (NSString*) <b>description</b>;<br />
    <div class="desc">
      
            Returns a string describing the status of the
            receiver. <br /> For an instance configured to
            maintain a periodic breakdown of stats, this
            reports information for the current second, all
            seconds in the current minute, all minutes in the
            current period, and all periods in the configured
            number of periods. <br /> For an instance configured
            with no periodic breakdown, this produces a
            <strong>short</strong> summary of the total count
            of events and, where durations are used, the maximum,
            minimum and average duration of events.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-enableNotifications$">enableNotifications:&nbsp;</a></h3>
    - (BOOL) <b>enableNotifications:</b> (BOOL)flag;<br />
    <div class="desc">
      
            Sets a <var>flag</var> to say whether the receiver
            will send GSThroughputNotification at the end of each
            minute to provide information about statistics.
            <br /> The method returnes the previous setting. The
            initial setting is <code>NO</code>. <br /> The
            notification object is the reciever, and the
            user info dictionary contains some or all of the
            following keys depending on how the receiver was
            configured:
            
      <dl>
        <dt>GSThroughputCountKey</dt>
        <dd>
          
                The number of events recorded (
                <strong>unsigned</strong> integer number)
              
        </dd>
        <dt>GSThroughputMaximumKey</dt>
        <dd>
          
                The maximum event duration (<strong>double</strong>
                floating point number)
              
        </dd>
        <dt>GSThroughputMinimumKey</dt>
        <dd>
          
                The minimum event duration (<strong>double</strong>
                floating point number) or -1.0 if no events
                occurred during the minute.
              
        </dd>
        <dt>GSThroughputTimeKey</dt>
        <dd>
          
                The time of the start of the minute (an NSDate)
              
        </dd>
        <dt>GSThroughputTotalKey</dt>
        <dd>
          
                The sum of event durations (<strong>double</strong>
                floating point number)
              
        </dd>
      </dl>
      
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-endDuration">endDuration&nbsp;</a></h3>
    - (void) <b>endDuration</b>;<br />
    <div class="desc">
      
            Ends duration recording for the current event started
            by a matching call to the
            <a rel="gsdoc" href="#method$GSThroughput-startDuration$">
              -startDuration:
            </a>

            method. <br /> Calls to this method without a
            matching call to
            <a rel="gsdoc" href="#method$GSThroughput-startDuration$">
              -startDuration:
            </a>

            are quietly ignored. This is useful if you wish to time
            a function or method by starting/ending timing
            before/after calling it, but also want the
            function/method to be able to end timing of
            itsself before it calls another function/method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-endDuration$">endDuration:&nbsp;</a></h3>
    - (void) <b>endDuration:</b> (unsigned)count;<br />
    <div class="desc">
      
            Acts like
            <a rel="gsdoc" href="#method$GSThroughput-endDuration">
              -endDuration
            </a>

            but records the duration as a total for
            <var>count</var> events (if <var>count</var> is zero
            then this ends the interval started by the
            corresponding
            <a rel="gsdoc" href="#method$GSThroughput-startDuration$">
              -startDuration:
            </a>

            call, but nothing is logged). <br /> This can be used
            when recording multiple events where the overhead of
            timing each event individually would be too great.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-init">init&nbsp;</a></h3>
    - (id) <b>init</b>;<br />
    <div class="desc">
      
            Initialises the receiver for duration logging
            (in the current thread only) for fifteen minute periods
            over the last twentyfour hours.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-initWithDurations$forPeriods$ofLength$">initWithDurations:&nbsp;forPeriods:&nbsp;ofLength:&nbsp;</a></h3>
    - (id) <b>initWithDurations:</b> (BOOL)aFlag<b> forPeriods:</b> (unsigned)numberOfPeriods<b> ofLength:</b> (unsigned)minutesPerPeriod;<br />
This is a designated initialiser for the class.<br />
    <div class="desc">
      
            
    </p>
    <p>

              Initialises the receiver to maintain stats
              (for the current thread only) over a particular time
              range, specifying whether duration statistics are
              to be maintained, or just event/transaction counts.
                </p>
    <p>
      
            
    </p>
    <p>

              If the specified <var>numberOfPeriods</var> or
              <var>minutesPerPeriod</var> is zero, only a running
              total is maintained rather than a per-second
              breakdown for the current minute and per minute
              breakdown for the current period and period
              breakdown for the number of periods.
                </p>
    <p>
      
            
    </p>
    <p>

              If all instances in a thread are initialised with
              <var>numberOfPeriods</var> or
              <var>minutesPerPeriod</var> of zero, the
              <a rel="gsdoc" href="#method$GSThroughput+tick">
                +tick
              </a>

              method does not need to be called and
              <a rel="gsdoc" href="#method$GSThroughput+setTick$">
                +setTick:
              </a>

              should not be used.
                </p>
    <p>
      
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-name">name&nbsp;</a></h3>
    - (NSString*) <b>name</b>;<br />
    <div class="desc">
      
            Return the name of this instance (as set using
            -setName:). <br /> This is used in the
            <a rel="gsdoc" href="#method$GSThroughput-description">
              -description
            </a>

            method and for ordering instances in the
            <a rel="gsdoc" href="#method$GSThroughput+description">
              +description
            </a>

            method.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-setName$">setName:&nbsp;</a></h3>
    - (void) <b>setName:</b> (NSString*)name;<br />
    <div class="desc">
      
            Sets the <var>name</var> of this instance.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$GSThroughput-startDuration$">startDuration:&nbsp;</a></h3>
    - (void) <b>startDuration:</b> (NSString*)name;<br />
    <div class="desc">
      
            Starts recording the duration of an event. This must
            be followed by a matching call to the
            <a rel="gsdoc" href="#method$GSThroughput-endDuration">
              -endDuration
            </a>

            method. <br /> The <var>name</var> argument is used
            to identify the location of the call for
            debugging/logging purposes, and you must
            ensure that the string continues to exist up to the
            point where
            <a rel="gsdoc" href="#method$GSThroughput-endDuration">
              -endDuration
            </a>

            is called, as the receiver will not retain it. <br />
            You may use this method only if the receiver was
            initialised with duration logging turned on.
            <br /> Use of this method if the reciever does not
            support duration logging or if the method has
            already been called without a matching call to
            <a rel="gsdoc" href="#method$GSThroughput-endDuration">
              -endDuration
            </a>

            will cause an exception to be raised.
          
    </div>
    <hr width="25%" align="left" />
</div>
<a name="_GSThroughput_ivars"/>    <br/><hr width="50%" align="left" />
    <h2>Instance Variables for GSThroughput Class</h2>
    <h3><a name="ivariable$GSThroughput*_data">_data</a></h3>
    @protected void* <b>_data</b>;<br />
    <div class="desc">
      
            <em>Warning</em> the underscore at the start of the
            name of this instance variable indicates that, even
            though it is not technically <em>private</em>, it is
            intended for internal use within the package, and
            you should not use the variable in other code.
          
    </div>
    <hr width="25%" align="left" />
    <br/><hr width="50%" align="left" /><br/>

          <h1><a name="002000000000">GSThroughput constants</a></h1>
    <p>
    </p>
    <h3><a name="constant$GSThroughputCountKey">GSThroughputCountKey</a></h3>
    NSString* const GSThroughputCountKey;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <h3><a name="constant$GSThroughputMaximumKey">GSThroughputMaximumKey</a></h3>
    NSString* const GSThroughputMaximumKey;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <h3><a name="constant$GSThroughputMinimumKey">GSThroughputMinimumKey</a></h3>
    NSString* const GSThroughputMinimumKey;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <h3><a name="constant$GSThroughputNotification">GSThroughputNotification</a></h3>
    NSString* const GSThroughputNotification;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <h3><a name="constant$GSThroughputTimeKey">GSThroughputTimeKey</a></h3>
    NSString* const GSThroughputTimeKey;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <h3><a name="constant$GSThroughputTotalKey">GSThroughputTotalKey</a></h3>
    NSString* const GSThroughputTotalKey;<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <hr width="25%" align="left" />
    <br />
    </font>
</body>
</html>