Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for LocalDir (0.13 sec)

  1. src/cmd/vendor/golang.org/x/telemetry/internal/upload/findwork.go

    // and uploading is supposed to be idempotent.)
    func (u *uploader) findWork() work {
    	localdir, uploaddir := u.dir.LocalDir(), u.dir.UploadDir()
    	var ans work
    	fis, err := os.ReadDir(localdir)
    	if err != nil {
    		u.logger.Printf("Could not find work: failed to read local dir %s: %v", localdir, err)
    		return ans
    	}
    
    	mode, asof := u.dir.Mode()
    	u.logger.Printf("Finding work: mode %s, asof %s", mode, asof)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:12:15 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/telemetry/internal/upload/Doc.txt

    
    There are various error conditions.
    1. Several processes could look at localdir and see work to do.
    1A. They could see different sets of expired count files for some day.
        This could happen if another process is removing count files. In this
        case there is already a YYYY-MM-DD.json file either in localdir
        or updatedir, so the process seeing fewer count files will not generate
        a report.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:57:25 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/telemetry/start.go

    		return result
    	}
    
    	counter.Open()
    
    	if _, err := os.Stat(telemetry.Default.LocalDir()); err != nil {
    		// There was a problem statting LocalDir, which is needed for both
    		// crash monitoring and counter uploading. Most likely, there was an
    		// error creating telemetry.LocalDir in the counter.Open call above.
    		// Don't start the child.
    		return result
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/telemetry/internal/telemetry/dir.go

    // data.
    //
    // If Default is uninitialized, Default.Mode will be "off". As a consequence,
    // no data should be written to the directory, and so the path values of
    // LocalDir, UploadDir, etc. must not matter.
    //
    // Default is a global for convenience and testing, but should not be mutated
    // outside of tests.
    //
    // TODO(rfindley): it would be nice to completely eliminate this global state,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 16:13:09 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  5. src/cmd/go/script_test.go

    		rewrite = true
    		archive.Files[gosumIdx].Data = newGosumData
    	}
    	return rewrite
    }
    
    func readCounters(t *testing.T, telemetryDir string) map[string]uint64 {
    	localDir := filepath.Join(telemetryDir, "local")
    	dirents, err := os.ReadDir(localDir)
    	if err != nil {
    		if os.IsNotExist(err) {
    			return nil // The Go command didn't ever run so the local dir wasn't created
    		}
    		t.Fatalf("reading telemetry local dir: %v", err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 18:15:22 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/telemetry/internal/counter/file.go

    	// a race.
    	weekends := filepath.Join(telemetry.Default.LocalDir(), "weekends")
    	day := fmt.Sprintf("%d\n", rand.Intn(7))
    	if _, err := os.ReadFile(weekends); err != nil {
    		if err := os.MkdirAll(telemetry.Default.LocalDir(), 0777); err != nil {
    			debugPrintf("%v: could not create telemetry.LocalDir %s", err, telemetry.Default.LocalDir())
    			return 0, err
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/telemetry/internal/upload/reports.go

    		if err != nil {
    			return "", fmt.Errorf("failed to marshal upload report for %s: %v", expiryDate, err)
    		}
    	}
    	localFileName := filepath.Join(u.dir.LocalDir(), "local."+expiryDate+".json")
    	uploadFileName := filepath.Join(u.dir.LocalDir(), expiryDate+".json")
    
    	/* Prepare to write files */
    	// if either file exists, someone has been here ahead of us
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 14:52:56 UTC 2024
    - 10.3K bytes
    - Viewed (0)
Back to top