Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite87ba59

Browse files
committed
Fix gen
1 parent0f06b23 commite87ba59

File tree

6 files changed

+27
-18
lines changed

6 files changed

+27
-18
lines changed

‎agent/agent.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,6 @@ func (a *agent) startReportingConnectionStats(ctx context.Context) {
12721272
a.logger.Info(ctx,"skipping stat because nothing changed")
12731273
return
12741274
}
1275-
a.latestStat.Store(stats)
12761275

12771276
select {
12781277
casea.connStatsChan<-stats:

‎coderd/apidoc/docs.go

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/database/dbfake/databasefake.go

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ func (q *fakeQuerier) GetDeploymentWorkspaceAgentStats(_ context.Context, create
293293
for_,agentStat:=rangeagentStatsCreatedAfter {
294294
stat.WorkspaceRxBytes+=agentStat.RxBytes
295295
stat.WorkspaceTxBytes+=agentStat.TxBytes
296-
latencies=append(latencies,float64(agentStat.ConnectionMedianLatencyMS))
296+
latencies=append(latencies,agentStat.ConnectionMedianLatencyMS)
297297
}
298298

299299
tryPercentile:=func(fs []float64,pfloat64)float64 {
@@ -1029,7 +1029,7 @@ func (q *fakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
10291029
}
10301030

10311031
ifarg.Status!="" {
1032-
build,err:=q.GetLatestWorkspaceBuildByWorkspaceID(ctx,workspace.ID)
1032+
build,err:=q.getLatestWorkspaceBuildByWorkspaceIDNoLock(ctx,workspace.ID)
10331033
iferr!=nil {
10341034
returnnil,xerrors.Errorf("get latest build: %w",err)
10351035
}
@@ -1118,7 +1118,7 @@ func (q *fakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
11181118
}
11191119

11201120
ifarg.HasAgent!="" {
1121-
build,err:=q.GetLatestWorkspaceBuildByWorkspaceID(ctx,workspace.ID)
1121+
build,err:=q.getLatestWorkspaceBuildByWorkspaceIDNoLock(ctx,workspace.ID)
11221122
iferr!=nil {
11231123
returnnil,xerrors.Errorf("get latest build: %w",err)
11241124
}
@@ -1424,10 +1424,14 @@ func (q *fakeQuerier) GetWorkspaceBuildByJobID(_ context.Context, jobID uuid.UUI
14241424
return database.WorkspaceBuild{},sql.ErrNoRows
14251425
}
14261426

1427-
func (q*fakeQuerier)GetLatestWorkspaceBuildByWorkspaceID(_ context.Context,workspaceID uuid.UUID) (database.WorkspaceBuild,error) {
1427+
func (q*fakeQuerier)GetLatestWorkspaceBuildByWorkspaceID(ctx context.Context,workspaceID uuid.UUID) (database.WorkspaceBuild,error) {
14281428
q.mutex.RLock()
14291429
deferq.mutex.RUnlock()
14301430

1431+
returnq.getLatestWorkspaceBuildByWorkspaceIDNoLock(ctx,workspaceID)
1432+
}
1433+
1434+
func (q*fakeQuerier)getLatestWorkspaceBuildByWorkspaceIDNoLock(_ context.Context,workspaceID uuid.UUID) (database.WorkspaceBuild,error) {
14311435
varrow database.WorkspaceBuild
14321436
varbuildNumint32=-1
14331437
for_,workspaceBuild:=rangeq.workspaceBuilds {
@@ -3612,7 +3616,7 @@ func (q *fakeQuerier) GetDeploymentWorkspaceStats(ctx context.Context) (database
36123616

36133617
stat:= database.GetDeploymentWorkspaceStatsRow{}
36143618
for_,workspace:=rangeq.workspaces {
3615-
build,err:=q.GetLatestWorkspaceBuildByWorkspaceID(ctx,workspace.ID)
3619+
build,err:=q.getLatestWorkspaceBuildByWorkspaceIDNoLock(ctx,workspace.ID)
36163620
iferr!=nil {
36173621
returnstat,err
36183622
}

‎docs/api/general.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,12 +1186,12 @@ curl -X GET http://coder-server:8080/api/v2/deployment/stats \
11861186
11871187
```json
11881188
{
1189-
"aggregated_since":"string",
1189+
"aggregated_since":"2019-08-24T14:15:22Z",
11901190
"building_workspaces":0,
1191-
"collected_at":"string",
1191+
"collected_at":"2019-08-24T14:15:22Z",
11921192
"failed_workspaces":0,
11931193
"pending_workspaces":0,
1194-
"refreshing_at":"string",
1194+
"refreshing_at":"2019-08-24T14:15:22Z",
11951195
"running_workspaces":0,
11961196
"session_count_jetbrains":0,
11971197
"session_count_reconnecting_pty":0,

‎docs/api/schemas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2931,12 +2931,12 @@ CreateParameterRequest is a structure used to create a new parameter value for a
29312931

29322932
```json
29332933
{
2934-
"aggregated_since":"string",
2934+
"aggregated_since":"2019-08-24T14:15:22Z",
29352935
"building_workspaces":0,
2936-
"collected_at":"string",
2936+
"collected_at":"2019-08-24T14:15:22Z",
29372937
"failed_workspaces":0,
29382938
"pending_workspaces":0,
2939-
"refreshing_at":"string",
2939+
"refreshing_at":"2019-08-24T14:15:22Z",
29402940
"running_workspaces":0,
29412941
"session_count_jetbrains":0,
29422942
"session_count_reconnecting_pty":0,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp