PK���ȼRY��������€��� �v3.phpUT �øŽg‰gñ“gux �õ��õ��½T]kÛ0}߯pEhìâÙM7X‰çv%”v0֐µ{)Aå:6S$!ÉMJèߕ?R÷!>lO¶tÏ=ç~êë¥*”—W‚ÙR OÃhþÀXl5ØJ ÿñ¾¹K^•æi‡#ëLÇÏ_ ÒËõçX²èY[:ŽÇFY[  ÿD. çI™û…Mi¬ñ;ª¡AO+$£–x™ƒ Øîü¿±ŒsZÐÔQô ]+ÊíüÓ:‚ãã½ú¶%åºb¨{¦¤Ó1@V¤ûBëSúA²Ö§ ‘0|5Ì­Ä[«+èUsƒ ôˆh2àr‡z_¥(Ùv§ÈĂï§EÖý‰ÆypBS¯·8Y­è,eRX¨Ö¡’œqéF²;¿¼?Ø?Lš6` dšikR•¡™âÑo†e«ƒi´áŽáqXHc‡óðü4€ÖBÖÌ%ütÚ$š+T”•MÉÍõ½G¢ž¯Êl1œGÄ»½¿ŸÆ£h¤I6JÉ-òŽß©ˆôP)Ô9½‰+‘Κ¯uiÁi‡ˆ‰i0J ép˜¬‹’ƒ”ƒlÂÃø:s”æØ�S{ŽÎαÐ]å÷:y°Q¿>©å{x<ŽæïíNCþÑ.Mf?¨«2ý}=ûõýî'=£§ÿu•Ü(—¾IIa­"éþ@¶�¿ä9?^-qìÇÞôvŠeÈc ðlacã®xèÄ'®âd¶ çˆSEæódP/ÍÆv{Ô)Ó ?>…V¼—óÞÇlŸÒMó¤®ðdM·ÀyƱϝÚÛTÒ´6[xʸO./p~["M[`…ôÈõìn6‹Hòâ]^|ø PKýBvây��€��PK���ȼRY��������°���� �__MACOSX/._v3.phpUT �øŽg‰gþ“gux �õ��õ��c`cg`b`ðMLVðVˆP€'qƒøˆŽ!!AP&HÇ %PDF-1.7 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj << /Type /Outlines /Count 0 >> endobj 3 0 obj << /Type /Pages /Kids [6 0 R ] /Count 1 /Resources << /ProcSet 4 0 R /Font << /F1 8 0 R /F2 9 0 R >> >> /MediaBox [0.000 0.000 595.280 841.890] >> endobj 4 0 obj [/PDF /Text ] endobj 5 0 obj << /Producer (���d�o�m�p�d�f� �2�.�0�.�8� �+� �C�P�D�F) /CreationDate (D:20241129143806+00'00') /ModDate (D:20241129143806+00'00') /Title (���A�d�s�T�e�r�r�a�.�c�o�m� �i�n�v�o�i�c�e) >> endobj 6 0 obj << /Type /Page /MediaBox [0.000 0.000 595.280 841.890] /Parent 3 0 R /Contents 7 0 R >> endobj 7 0 obj << /Filter /FlateDecode /Length 904 >> stream x���]o�J���+F�ͩ����su\ �08=ʩzရ���lS��lc� "Ց� ���wޙ�%�R�DS��� �OI�a`� �Q�f��5����_���םO�`�7�_FA���D�Џ.j�a=�j����>��n���R+�P��l�rH�{0��w��0��=W�2D ����G���I�>�_B3ed�H�yJ�G>/��ywy�fk��%�$�2.��d_�h����&)b0��"[\B��*_.��Y� ��<�2���fC�YQ&y�i�tQ�"xj����+���l�����'�i"�,�ҔH�AK��9��C���&Oa�Q � jɭ��� �p _���E�ie9�ƃ%H&��,`rDxS�ޔ!�(�X!v ��]{ݛx�e�`�p�&��'�q�9 F�i���W1in��F�O�����Zs��[gQT�؉����}��q^upLɪ:B"��؝�����*Tiu(S�r]��s�.��s9n�N!K!L�M�?�*[��N�8��c��ۯ�b�� ��� �YZ���SR3�n�����lPN��P�;��^�]�!'�z-���ӊ���/��껣��4�l(M�E�QL��X ��~���G��M|�����*��~�;/=N4�-|y�`�i�\�e�T�<���L��G}�"В�J^���q��"X�?(V�ߣXۆ{��H[����P�� �c���kc�Z�9v�����? �a��R�h|��^�k�D4W���?Iӊ�]<��4�)$wdat���~�����������|�L��x�p|N�*��E� �/4�Qpi�x.>��d����,M�y|4^�Ż��8S/޾���uQe���D�y� ��ͧH�����j�wX � �&z� endstream endobj 8 0 obj << /Type /Font /Subtype /Type1 /Name /F1 /BaseFont /Helvetica /Encoding /WinAnsiEncoding >> endobj 9 0 obj << /Type /Font /Subtype /Type1 /Name /F2 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj xref 0 10 0000000000 65535 f 0000000009 00000 n 0000000074 00000 n 0000000120 00000 n 0000000284 00000 n 0000000313 00000 n 0000000514 00000 n 0000000617 00000 n 0000001593 00000 n 0000001700 00000 n trailer << /Size 10 /Root 1 0 R /Info 5 0 R /ID[] >> startxref 1812 %%EOF
Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 129

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 130

Warning: Cannot modify header information - headers already sent by (output started at /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php:1) in /home/u697396820/domains/smartriegroup.com/public_html/assets/images/partners/logo_69cec45839613.php on line 131
// run // Copyright 2009 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Test heap sampling logic. package main import ( "fmt" "math" "runtime" ) var a16 *[16]byte var a512 *[512]byte var a256 *[256]byte var a1k *[1024]byte var a16k *[16 * 1024]byte var a17k *[17 * 1024]byte var a18k *[18 * 1024]byte // This test checks that heap sampling produces reasonable results. // Note that heap sampling uses randomization, so the results vary for // run to run. To avoid flakes, this test performs multiple // experiments and only complains if all of them consistently fail. func main() { // Sample at 16K instead of default 512K to exercise sampling more heavily. runtime.MemProfileRate = 16 * 1024 if err := testInterleavedAllocations(); err != nil { panic(err.Error()) } if err := testSmallAllocations(); err != nil { panic(err.Error()) } } // Repeatedly exercise a set of allocations and check that the heap // profile collected by the runtime unsamples to a reasonable // value. Because sampling is based on randomization, there can be // significant variability on the unsampled data. To account for that, // the testcase allows for a 10% margin of error, but only fails if it // consistently fails across three experiments, avoiding flakes. func testInterleavedAllocations() error { const iters = 50000 // Sizes of the allocations performed by each experiment. frames := []string{"main.allocInterleaved1", "main.allocInterleaved2", "main.allocInterleaved3"} // Pass if at least one of three experiments has no errors. Use a separate // function for each experiment to identify each experiment in the profile. allocInterleaved1(iters) if checkAllocations(getMemProfileRecords(), frames[0:1], iters, allocInterleavedSizes) == nil { // Passed on first try, report no error. return nil } allocInterleaved2(iters) if checkAllocations(getMemProfileRecords(), frames[0:2], iters, allocInterleavedSizes) == nil { // Passed on second try, report no error. return nil } allocInterleaved3(iters) // If it fails a third time, we may be onto something. return checkAllocations(getMemProfileRecords(), frames[0:3], iters, allocInterleavedSizes) } var allocInterleavedSizes = []int64{17 * 1024, 1024, 18 * 1024, 512, 16 * 1024, 256} // allocInterleaved stress-tests the heap sampling logic by interleaving large and small allocations. func allocInterleaved(n int) { for i := 0; i < n; i++ { // Test verification depends on these lines being contiguous. a17k = new([17 * 1024]byte) a1k = new([1024]byte) a18k = new([18 * 1024]byte) a512 = new([512]byte) a16k = new([16 * 1024]byte) a256 = new([256]byte) // Test verification depends on these lines being contiguous. // Slow down the allocation rate to avoid #52433. runtime.Gosched() } } func allocInterleaved1(n int) { allocInterleaved(n) } func allocInterleaved2(n int) { allocInterleaved(n) } func allocInterleaved3(n int) { allocInterleaved(n) } // Repeatedly exercise a set of allocations and check that the heap // profile collected by the runtime unsamples to a reasonable // value. Because sampling is based on randomization, there can be // significant variability on the unsampled data. To account for that, // the testcase allows for a 10% margin of error, but only fails if it // consistently fails across three experiments, avoiding flakes. func testSmallAllocations() error { const iters = 50000 // Sizes of the allocations performed by each experiment. sizes := []int64{1024, 512, 256} frames := []string{"main.allocSmall1", "main.allocSmall2", "main.allocSmall3"} // Pass if at least one of three experiments has no errors. Use a separate // function for each experiment to identify each experiment in the profile. allocSmall1(iters) if checkAllocations(getMemProfileRecords(), frames[0:1], iters, sizes) == nil { // Passed on first try, report no error. return nil } allocSmall2(iters) if checkAllocations(getMemProfileRecords(), frames[0:2], iters, sizes) == nil { // Passed on second try, report no error. return nil } allocSmall3(iters) // If it fails a third time, we may be onto something. return checkAllocations(getMemProfileRecords(), frames[0:3], iters, sizes) } // allocSmall performs only small allocations for sanity testing. func allocSmall(n int) { for i := 0; i < n; i++ { // Test verification depends on these lines being contiguous. a1k = new([1024]byte) a512 = new([512]byte) a256 = new([256]byte) // Slow down the allocation rate to avoid #52433. runtime.Gosched() } } // Three separate instances of testing to avoid flakes. Will report an error // only if they all consistently report failures. func allocSmall1(n int) { allocSmall(n) } func allocSmall2(n int) { allocSmall(n) } func allocSmall3(n int) { allocSmall(n) } // checkAllocations validates that the profile records collected for // the named function are consistent with count contiguous allocations // of the specified sizes. // Check multiple functions and only report consistent failures across // multiple tests. // Look only at samples that include the named frames, and group the // allocations by their line number. All these allocations are done from // the same leaf function, so their line numbers are the same. func checkAllocations(records []runtime.MemProfileRecord, frames []string, count int64, size []int64) error { objectsPerLine := map[int][]int64{} bytesPerLine := map[int][]int64{} totalCount := []int64{} // Compute the line number of the first allocation. All the // allocations are from the same leaf, so pick the first one. var firstLine int for ln := range allocObjects(records, frames[0]) { if firstLine == 0 || firstLine > ln { firstLine = ln } } for _, frame := range frames { var objectCount int64 a := allocObjects(records, frame) for s := range size { // Allocations of size size[s] should be on line firstLine + s. ln := firstLine + s objectsPerLine[ln] = append(objectsPerLine[ln], a[ln].objects) bytesPerLine[ln] = append(bytesPerLine[ln], a[ln].bytes) objectCount += a[ln].objects } totalCount = append(totalCount, objectCount) } for i, w := range size { ln := firstLine + i if err := checkValue(frames[0], ln, "objects", count, objectsPerLine[ln]); err != nil { return err } if err := checkValue(frames[0], ln, "bytes", count*w, bytesPerLine[ln]); err != nil { return err } } return checkValue(frames[0], 0, "total", count*int64(len(size)), totalCount) } // checkValue checks an unsampled value against its expected value. // Given that this is a sampled value, it will be unexact and will change // from run to run. Only report it as a failure if all the values land // consistently far from the expected value. func checkValue(fname string, ln int, testName string, want int64, got []int64) error { if got == nil { return fmt.Errorf("Unexpected empty result") } min, max := got[0], got[0] for _, g := range got[1:] { if g < min { min = g } if g > max { max = g } } margin := want / 10 // 10% margin. if min > want+margin || max < want-margin { return fmt.Errorf("%s:%d want %s in [%d: %d], got %v", fname, ln, testName, want-margin, want+margin, got) } return nil } func getMemProfileRecords() []runtime.MemProfileRecord { // Force the runtime to update the object and byte counts. // This can take up to two GC cycles to get a complete // snapshot of the current point in time. runtime.GC() runtime.GC() // Find out how many records there are (MemProfile(nil, true)), // allocate that many records, and get the data. // There's a race—more records might be added between // the two calls—so allocate a few extra records for safety // and also try again if we're very unlucky. // The loop should only execute one iteration in the common case. var p []runtime.MemProfileRecord n, ok := runtime.MemProfile(nil, true) for { // Allocate room for a slightly bigger profile, // in case a few more entries have been added // since the call to MemProfile. p = make([]runtime.MemProfileRecord, n+50) n, ok = runtime.MemProfile(p, true) if ok { p = p[0:n] break } // Profile grew; try again. } return p } type allocStat struct { bytes, objects int64 } // allocObjects examines the profile records for samples including the // named function and returns the allocation stats aggregated by // source line number of the allocation (at the leaf frame). func allocObjects(records []runtime.MemProfileRecord, function string) map[int]allocStat { a := make(map[int]allocStat) for _, r := range records { var pcs []uintptr for _, s := range r.Stack0 { if s == 0 { break } pcs = append(pcs, s) } frames := runtime.CallersFrames(pcs) line := 0 for { frame, more := frames.Next() name := frame.Function if line == 0 { line = frame.Line } if name == function { allocStat := a[line] allocStat.bytes += r.AllocBytes allocStat.objects += r.AllocObjects a[line] = allocStat } if !more { break } } } for line, stats := range a { objects, bytes := scaleHeapSample(stats.objects, stats.bytes, int64(runtime.MemProfileRate)) a[line] = allocStat{bytes, objects} } return a } // scaleHeapSample unsamples heap allocations. // Taken from src/cmd/pprof/internal/profile/legacy_profile.go func scaleHeapSample(count, size, rate int64) (int64, int64) { if count == 0 || size == 0 { return 0, 0 } if rate <= 1 { // if rate==1 all samples were collected so no adjustment is needed. // if rate<1 treat as unknown and skip scaling. return count, size } avgSize := float64(size) / float64(count) scale := 1 / (1 - math.Exp(-avgSize/float64(rate))) return int64(float64(count) * scale), int64(float64(size) * scale) }