File: go123-sync.go

package info (click to toggle)
golang-golang-x-exp 0.0~git20250911.df92998-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,284 kB
  • sloc: ansic: 1,900; objc: 276; sh: 270; asm: 48; makefile: 27
file content (34 lines) | stat: -rw-r--r-- 881 bytes parent folder | download
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
// Copyright 2025 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.

// Code generated by "gen.bash" from internal/trace; DO NOT EDIT.

//go:build go1.23

package main

import (
	"golang.org/x/exp/trace"
	"golang.org/x/exp/trace/internal/testgen"
	"golang.org/x/exp/trace/internal/tracev2"
	"golang.org/x/exp/trace/internal/version"
	"time"
)

func main() {
	testgen.Main(version.Go123, gen)
}

func gen(t *testgen.Trace) {
	g1 := t.Generation(1)
	g1.Sync(1000000000, 10, 0, time.Time{})
	b10 := g1.Batch(1, 15)
	b10.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning)
	g2 := t.Generation(2)
	g2.Sync(500000000, 20, 0, time.Time{})
	g3 := t.Generation(3)
	b30 := g3.Batch(1, 30)
	b30.Event("ProcStatus", trace.ProcID(0), tracev2.ProcRunning)
	g3.Sync(500000000, 40, 0, time.Time{})
}