Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for checkValid (0.2 sec)

  1. src/cmd/vendor/github.com/google/pprof/profile/profile.go

    	_, err := w.Write(serialize(p))
    	return err
    }
    
    // CheckValid tests whether the profile is valid. Checks include, but are
    // not limited to:
    //   - len(Profile.Sample[n].value) == len(Profile.value_unit)
    //   - Sample.id has a corresponding Profile.Location
    func (p *Profile) CheckValid() error {
    	// Check that sample values are consistent
    	sampleLen := len(p.SampleType)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  2. src/cmd/vendor/github.com/google/pprof/internal/driver/fetch.go

    			if err = p.Write(tempFile); err == nil {
    				o.UI.PrintErr("Saved profile in ", tempFile.Name())
    			}
    		}
    		if err != nil {
    			o.UI.PrintErr("Could not save profile: ", err)
    		}
    	}
    
    	if err := p.CheckValid(); err != nil {
    		return nil, err
    	}
    
    	return p, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 31 19:48:28 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. src/encoding/json/decode.go

    // character U+FFFD.
    func Unmarshal(data []byte, v any) error {
    	// Check for well-formedness.
    	// Avoids filling out half a data structure
    	// before discovering a JSON syntax error.
    	var d decodeState
    	err := checkValid(data, &d.scan)
    	if err != nil {
    		return err
    	}
    
    	d.init(data)
    	return d.unmarshal(v)
    }
    
    // Unmarshaler is the interface implemented by types
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  4. src/runtime/metrics_test.go

    		var w bytes.Buffer
    		pprof.Lookup("mutex").WriteTo(&w, 0)
    		p, err := profile.Parse(&w)
    		if err != nil {
    			t.Fatalf("failed to parse profile: %v", err)
    		}
    		if err := p.CheckValid(); err != nil {
    			t.Fatalf("invalid profile: %v", err)
    		}
    		return p
    	}
    
    	measureDelta := func(t *testing.T, fn func()) (metricGrowth, profileGrowth float64, p *profile.Profile) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 45K bytes
    - Viewed (0)
Back to top