diff --git a/ent/schema/actioncachestatistics.go b/ent/schema/actioncachestatistics.go index 6dc05a3..cec947a 100644 --- a/ent/schema/actioncachestatistics.go +++ b/ent/schema/actioncachestatistics.go @@ -28,7 +28,7 @@ func (ActionCacheStatistics) Fields() []ent.Field { // action cache has not been loaded in this invocation. field.Int64("load_time_in_ms").Optional(), - //// Cache counters. + // Cache counters. field.Int32("hits").Optional(), field.Int32("misses").Optional(), } @@ -37,7 +37,7 @@ func (ActionCacheStatistics) Fields() []ent.Field { // Edges of the ActionCacheStatistics. func (ActionCacheStatistics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the associated action summary + // Edge back to the associated action summary. edge.From("action_summary", ActionSummary.Type). Ref("action_cache_statistics"), diff --git a/ent/schema/actiondata.go b/ent/schema/actiondata.go index b8050ff..299f4b7 100644 --- a/ent/schema/actiondata.go +++ b/ent/schema/actiondata.go @@ -15,7 +15,7 @@ type ActionData struct { func (ActionData) Fields() []ent.Field { return []ent.Field{ - //the action name + // The action name. field.String("mnemonic").Optional(), // The total number of actions of this type executed during the build. As @@ -47,7 +47,7 @@ func (ActionData) Fields() []ent.Field { // Edges of the ActionData. func (ActionData) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the associated action summary + // Edge back to the associated action summary. edge.From("action_summary", ActionSummary.Type). Ref("action_data"), } diff --git a/ent/schema/actionsummary.go b/ent/schema/actionsummary.go index 31bbc56..09a36f9 100644 --- a/ent/schema/actionsummary.go +++ b/ent/schema/actionsummary.go @@ -49,7 +49,7 @@ func (ActionSummary) Edges() []ent.Edge { // Contains the top N actions by number of actions executed. edge.To("action_data", ActionData.Type), - //Count of which Runner types were executed which actions + // Count of which Runner types were executed which actions. edge.To("runner_count", RunnerCount.Type), // Information about the action cache behavior during a single invocation. diff --git a/ent/schema/artifactmetrics.go b/ent/schema/artifactmetrics.go index 80fa243..43b4771 100644 --- a/ent/schema/artifactmetrics.go +++ b/ent/schema/artifactmetrics.go @@ -18,7 +18,7 @@ func (ArtifactMetrics) Fields() []ent.Field { // Edges of the ArtifactMetrics. func (ArtifactMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metrics object + // Edge back to the metrics object edge.From("metrics", Metrics.Type).Ref("artifact_metrics"), // Measures all source files newly read this build. Does not include diff --git a/ent/schema/bazelinvocation.go b/ent/schema/bazelinvocation.go index e164c1f..b43803b 100644 --- a/ent/schema/bazelinvocation.go +++ b/ent/schema/bazelinvocation.go @@ -20,36 +20,56 @@ type BazelInvocation struct { // Fields of the BazelInvocation. func (BazelInvocation) Fields() []ent.Field { return []ent.Field{ + + // The bazel client invocation ID. field.UUID("invocation_id", uuid.UUID{}).Unique().Immutable(), + + // Time the event started. field.Time("started_at"), + + // Time the event ended field.Time("ended_at").Optional(), + // Rethink? Keep for now to capture existing processing. field.Int("change_number").Optional(), + + // Rethink? Keep for now. field.Int("patchset_number").Optional(), - field.JSON("summary", summary.InvocationSummary{}).Annotations(entgql.Skip()), // NOTE: Internal model, not exposed to API. + + // NOTE: Internal model, not exposed to API. + // contains invocation information + field.JSON("summary", summary.InvocationSummary{}).Annotations(entgql.Skip()), + + // Build Event Protocol completed successfuly. field.Bool("bep_completed").Optional(), + + // Rethink, keep for now. + // A step label pulled from the metada field.String("step_label"), - field.JSON("related_files", map[string]string{}).Annotations(entgql.Skip()), // NOTE: Uses custom resolver. - //email address of the user who launched the invocation if provided + // NOTE: Uses custom resolver. + // Log snippets of error saved to disk. Rethink and store in db? + field.JSON("related_files", map[string]string{}).Annotations(entgql.Skip()), + + // Email address of the user who launched the invocation if provided. field.String("user_email").Optional(), - //ldap (username) of the user who launched the invocation if provided//The user who + // Ldap (username) of the user who launched the invocation if provided. field.String("user_ldap").Optional(), - //the full logs from the build + // The full logs from the build.. field.String("build_logs").Optional(), - //the cpu type from the configuration event(s) + // The cpu type from the configuration event(s). field.String("cpu").Optional(), - //the platform name from the configuration event(s) + // The platform name from the configuration event(s). field.String("platform_name").Optional(), - //the name from the configuration event(s) + // The name from the configuration event(s). field.String("configuration_mnemonic").Optional(), - //the number of successful fetch events seen + // The number of successful fetch events seen. field.Int64("num_fetches").Optional(), } } @@ -57,20 +77,27 @@ func (BazelInvocation) Fields() []ent.Field { // Edges of the BazelInvocation. func (BazelInvocation) Edges() []ent.Edge { return []ent.Edge{ + + // Edge back from the Event Files. edge.From("event_file", EventFile.Type). Ref("bazel_invocation"). Unique(). Required(), + + // Edge back from the Build. edge.From("build", Build.Type). Ref("invocations"). Unique(), + // Edge to any probles detected. + // NOTE: Uses custom resolver / types. edge.To("problems", BazelInvocationProblem.Type). - Annotations(entgql.Skip(entgql.SkipType)), // NOTE: Uses custom resolver / types. + Annotations(entgql.Skip(entgql.SkipType)), //Build Metrics for the Completed Invocation edge.To("metrics", Metrics.Type). Unique(), + //Test Data for the completed Invocation edge.To("test_collection", TestCollection.Type), diff --git a/ent/schema/bazelinvocationproblem.go b/ent/schema/bazelinvocationproblem.go index 95834ff..b37054f 100644 --- a/ent/schema/bazelinvocationproblem.go +++ b/ent/schema/bazelinvocationproblem.go @@ -17,9 +17,15 @@ type BazelInvocationProblem struct { // Fields of the BazelInvocationProblem. func (BazelInvocationProblem) Fields() []ent.Field { return []ent.Field{ + // The Problem Type. field.String("problem_type"), + + // The Problem Label. field.String("label"), - field.JSON("bep_events", json.RawMessage{}).Annotations(entgql.Skip()), // NOTE: Internal model, not exposed to API. + + // The bep_events raw message associated with the field. + // NOTE: Internal model, not exposed to API. + field.JSON("bep_events", json.RawMessage{}).Annotations(entgql.Skip()), } } diff --git a/ent/schema/buildgraphmetrics.go b/ent/schema/buildgraphmetrics.go index 2f2b730..8e85dd8 100644 --- a/ent/schema/buildgraphmetrics.go +++ b/ent/schema/buildgraphmetrics.go @@ -15,6 +15,7 @@ type BuildGraphMetrics struct { func (BuildGraphMetrics) Fields() []ent.Field { return []ent.Field{ + // Action Value Lookup Count. // How many configured targets/aspects were in this build, including any // that were analyzed on a prior build and are still valid. May not be // populated if analysis phase was fully cached. Note: for historical @@ -22,39 +23,47 @@ func (BuildGraphMetrics) Fields() []ent.Field { // that do not actually have associated actions. field.Int32("action_lookup_value_count").Optional(), + // Action Value Lookup Count Not Including Aspects. // How many configured targets alone were in this build: always at most // action_lookup_value_count. Useful mainly for historical comparisons to // TargetMetrics.targets_configured, which used to not count aspects. This // also includes configured targets that do not have associated actions. field.Int32("action_lookup_value_count_not_including_aspects").Optional(), + // Action Count. // How many actions belonged to the configured targets/aspects above. It may // not be necessary to execute all of these actions to build the requested // targets. May not be populated if analysis phase was fully cached. field.Int32("action_count").Optional(), + // Action Count Not Including Aspects. // How many configured targets alone were in this build: always at most // action_lookup_value_count. Useful mainly for historical comparisons to // TargetMetrics.targets_configured, which used to not count aspects. This // also includes configured targets that do not have associated actions. field.Int32("action_count_not_including_aspects").Optional(), + // Input File Configured Target Count. // How many "input file" configured targets there were: one per source file. // Should agree with artifact_metrics.source_artifacts_read.count above, field.Int32("input_file_configured_target_count").Optional(), + // Output File Configured Target Count. // How many "output file" configured targets there were: output files that // are targets (not implicit outputs). field.Int32("output_file_configured_target_count").Optional(), + // Other Configured Target Count. // How many "other" configured targets there were (like alias, // package_group, and other non-rule non-file configured targets). field.Int32("other_configured_target_count").Optional(), + // Output Artifact Count. // How many artifacts are outputs of the above actions. May not be populated // if analysis phase was fully cached. field.Int32("output_artifact_count").Optional(), + // Post Invocation Skyframe Node Count. // How many Skyframe nodes there are in memory at the end of the build. This // may underestimate the number of nodes when running with memory-saving // settings or with Skybuild, and may overestimate if there are nodes from @@ -68,25 +77,31 @@ func (BuildGraphMetrics) Edges() []ent.Edge { return []ent.Edge{ edge.From("metrics", Metrics.Type). Ref("build_graph_metrics"), + //NOTE: these are all missing from the proto, but i'm including them here for now for completeness + // Dirtied Values. // Number of SkyValues that were dirtied during the build. Dirtied nodes are // those that transitively depend on a node that changed by itself (e.g. one // representing a file in the file system) edge.To("dirtied_values", EvaluationStat.Type), + // Changed Values. // Number of SkyValues that changed by themselves. For example, when a file // on the file system changes, the SkyValue representing it will change. edge.To("changed_values", EvaluationStat.Type), + // Built Values. // Number of SkyValues that were built. This means that they were evaluated // and were found to have changed from their previous version. edge.To("built_values", EvaluationStat.Type), + // Cleaned Values. // Number of SkyValues that were evaluated and found clean, i.e. equal to // their previous version. edge.To("cleaned_values", EvaluationStat.Type), + // Evaluated Values. // Number of evaluations to build SkyValues. This includes restarted // evaluations, which means there can be multiple evaluations per built // SkyValue. Subtract built_values from this number to get the number of diff --git a/ent/schema/cumulativemetrics.go b/ent/schema/cumulativemetrics.go index 95b0120..5293e9e 100644 --- a/ent/schema/cumulativemetrics.go +++ b/ent/schema/cumulativemetrics.go @@ -15,11 +15,13 @@ type CumulativeMetrics struct { func (CumulativeMetrics) Fields() []ent.Field { return []ent.Field{ + // Number Of Analyses. // One-indexed number of "analyses" the server has run, including the // current one. Will be incremented for every build/test/cquery/etc. command // that reaches the analysis phase. field.Int32("num_analyses").Optional(), + // Number of Builds. // One-indexed number of "builds" the server has run, including the current // one. Will be incremented for every build/test/run/etc. command that // reaches the execution phase. @@ -31,7 +33,7 @@ func (CumulativeMetrics) Fields() []ent.Field { func (CumulativeMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metircs object + // Edge back to the metircs object. edge.From("metrics", Metrics.Type).Ref("cumulative_metrics"), } } diff --git a/ent/schema/dynamicexecutionmetrics.go b/ent/schema/dynamicexecutionmetrics.go index 9a9f324..7a3bc22 100644 --- a/ent/schema/dynamicexecutionmetrics.go +++ b/ent/schema/dynamicexecutionmetrics.go @@ -19,7 +19,7 @@ func (DynamicExecutionMetrics) Fields() []ent.Field { func (DynamicExecutionMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metrics object + // Edge back to the metrics object. edge.From("metrics", Metrics.Type).Ref("dynamic_execution_metrics"), // Race statistics grouped by mnemonic, local_name, remote_name. diff --git a/ent/schema/evaluationstat.go b/ent/schema/evaluationstat.go index 932416a..30eb52f 100644 --- a/ent/schema/evaluationstat.go +++ b/ent/schema/evaluationstat.go @@ -28,25 +28,30 @@ func (EvaluationStat) Edges() []ent.Edge { return []ent.Edge{ edge.From("build_graph_metrics", BuildGraphMetrics.Type). - //NOTE: Not populated on the proto currently, but included here for completeness + // NOTE: Not populated on the proto currently, but included here for completeness. + // Dirtied Values. // Number of SkyValues that were dirtied during the build. Dirtied nodes are // those that transitively depend on a node that changed by itself (e.g. one // representing a file in the file system) Ref("dirtied_values"). + // Changed Values. // Number of SkyValues that changed by themselves. For example, when a file // on the file system changes, the SkyValue representing it will change. Ref("changed_values"). + // Built Values. // Number of SkyValues that were built. This means that they were evaluated // and were found to have changed from their previous version. Ref("built_values"). + // Cleaned Values. // Number of SkyValues that were evaluated and found clean, i.e. equal to // their previous version. Ref("cleaned_values"). + // Evaluated Values. // Number of evaluations to build SkyValues. This includes restarted // evaluations, which means there can be multiple evaluations per built // SkyValue. Subtract built_values from this number to get the number of diff --git a/ent/schema/executioninfo.go b/ent/schema/executioninfo.go index 4425fd1..6e74b27 100644 --- a/ent/schema/executioninfo.go +++ b/ent/schema/executioninfo.go @@ -18,7 +18,7 @@ func (ExectionInfo) Fields() []ent.Field { // Deprecated, use TargetComplete.test_timeout instead. field.Int32("timeout_seconds").Optional(), - // Name of the strategy to execute this test action (e.g., "local", "remote") + // Name of the strategy to execute this test action (e.g., "local", "remote"). field.String("strategy").Optional(), // True, if the reported attempt was a cache hit in a remote cache. @@ -27,6 +27,7 @@ func (ExectionInfo) Fields() []ent.Field { // The exit code of the test action. field.Int32("exit_code").Optional(), + // Hostname. // The hostname of the machine where the test action was executed (in case // of remote execution), if known. field.String("hostname").Optional(), @@ -36,7 +37,8 @@ func (ExectionInfo) Fields() []ent.Field { // Edges of ExectionInfo. func (ExectionInfo) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the test result + + // Edge back to the test result edge.From("test_result", TestResultBES.Type).Ref("execution_info"), // Represents a hierarchical timing breakdown of an activity. diff --git a/ent/schema/filesmetric.go b/ent/schema/filesmetric.go index debf204..688af7a 100644 --- a/ent/schema/filesmetric.go +++ b/ent/schema/filesmetric.go @@ -15,10 +15,10 @@ type FilesMetric struct { func (FilesMetric) Fields() []ent.Field { return []ent.Field{ - // The total size in bytes + // The total size in bytes. field.Int64("size_in_bytes").Optional(), - //The total Coount + // The total Coount. field.Int32("count").Optional(), } } @@ -28,21 +28,25 @@ func (FilesMetric) Edges() []ent.Edge { return []ent.Edge{ edge.From("artifact_metrics", ArtifactMetrics.Type). + // Source Artifacts Read. // Measures all source files newly read this build. Does not include // unchanged sources on incremental builds. Ref("source_artifacts_read"). + // Output Artifacts Seen. // Measures all output artifacts from executed actions. This includes // actions that were cached locally (via the action cache) or remotely (via // a remote cache or executor), but does *not* include outputs of actions // that were cached internally in Skyframe. Ref("output_artifacts_seen"). + // Output Artifacts From Cache. // Measures all output artifacts from actions that were cached locally // via the action cache. These artifacts were already present on disk at the // start of the build. Does not include Skyframe-cached actions' outputs. Ref("output_artifacts_from_action_cache"). + // Top Level Artifacts. // Measures all artifacts that belong to a top-level output group. Does not // deduplicate, so if there are two top-level targets in this build that // share an artifact, it will be counted twice. diff --git a/ent/schema/garbagemetrics.go b/ent/schema/garbagemetrics.go index 9b7722b..b086939 100644 --- a/ent/schema/garbagemetrics.go +++ b/ent/schema/garbagemetrics.go @@ -27,7 +27,7 @@ func (GarbageMetrics) Fields() []ent.Field { func (GarbageMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the memory metrics object + // Edge back to the memory metrics object edge.From("memory_metrics", MemoryMetrics.Type). Ref("garbage_metrics"), } diff --git a/ent/schema/memorymetrics.go b/ent/schema/memorymetrics.go index 5c5eaf0..d78afa6 100644 --- a/ent/schema/memorymetrics.go +++ b/ent/schema/memorymetrics.go @@ -33,11 +33,11 @@ func (MemoryMetrics) Fields() []ent.Field { func (MemoryMetrics) Edges() []ent.Edge { return []ent.Edge{ - // edge back to the memory metrics object + // Edge back to the memory metrics object edge.From("metrics", Metrics.Type). Ref("memory_metrics"), - // metrics about garbage collection + // Metrics about garbage collection edge.To("garbage_metrics", GarbageMetrics.Type), } } diff --git a/ent/schema/metrics.go b/ent/schema/metrics.go index 1656ff8..a2d6f20 100644 --- a/ent/schema/metrics.go +++ b/ent/schema/metrics.go @@ -21,39 +21,39 @@ func (Metrics) Fields() []ent.Field { func (Metrics) Edges() []ent.Edge { return []ent.Edge{ - // edge back to the bazel invocation + // Edge back to the bazel invocation. edge.From("bazel_invocation", BazelInvocation.Type). Ref("metrics"). Unique(), - // the action summmary with details about actions executed + // The action summmary with details about actions executed. edge.To("action_summary", ActionSummary.Type), - // details about memory usage and garbage collections + // Details about memory usage and garbage collections. edge.To("memory_metrics", MemoryMetrics.Type), - // target metrics + // Target metrics. edge.To("target_metrics", TargetMetrics.Type), - // package metrics + // Package metrics. edge.To("package_metrics", PackageMetrics.Type), - // timing metrics + // Timing metrics. edge.To("timing_metrics", TimingMetrics.Type), - //cumulative metrics + // Cumulative metrics. edge.To("cumulative_metrics", CumulativeMetrics.Type), - //artifact metrics + // Artifact metrics. edge.To("artifact_metrics", ArtifactMetrics.Type), - //network metrics if available + // Network metrics if available. edge.To("network_metrics", NetworkMetrics.Type), - //dynamic execution metrics if available + // Dynamic execution metrics if available. edge.To("dynamic_execution_metrics", DynamicExecutionMetrics.Type), - //build graph metrics + // Build graph metrics. edge.To("build_graph_metrics", BuildGraphMetrics.Type), } } diff --git a/ent/schema/missdetail.go b/ent/schema/missdetail.go index 12bc5ae..b77a2e8 100644 --- a/ent/schema/missdetail.go +++ b/ent/schema/missdetail.go @@ -27,7 +27,7 @@ func (MissDetail) Fields() []ent.Field { "UNKNOWN"). Default("UNKNOWN").Optional(), - // counter for this type + // Counter for this type. field.Int32("count").Optional(), } } @@ -36,7 +36,7 @@ func (MissDetail) Fields() []ent.Field { func (MissDetail) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the action cache statistics object + // Edge back to the action cache statistics object. edge.From("action_cache_statistics", ActionCacheStatistics.Type).Ref("miss_details"), } } diff --git a/ent/schema/namedsetoffiles.go b/ent/schema/namedsetoffiles.go index 28a30c9..54d117a 100644 --- a/ent/schema/namedsetoffiles.go +++ b/ent/schema/namedsetoffiles.go @@ -18,6 +18,8 @@ func (NamedSetOfFiles) Fields() []ent.Field { // Edges of the NamedSetOfFiles. func (NamedSetOfFiles) Edges() []ent.Edge { return []ent.Edge{ + + // Edge back to output group. edge.From("output_group", OutputGroup.Type). Ref("file_sets"), diff --git a/ent/schema/networkmetrics.go b/ent/schema/networkmetrics.go index 175c03d..e6581b2 100644 --- a/ent/schema/networkmetrics.go +++ b/ent/schema/networkmetrics.go @@ -19,7 +19,7 @@ func (NetworkMetrics) Fields() []ent.Field { func (NetworkMetrics) Edges() []ent.Edge { return []ent.Edge{ - //Edge back to the metrics object + // Edge back to the metrics object. edge.From("metrics", Metrics.Type).Ref("network_metrics"), // Information about host network. diff --git a/ent/schema/outputgroup.go b/ent/schema/outputgroup.go index f0e8d43..1e6925b 100644 --- a/ent/schema/outputgroup.go +++ b/ent/schema/outputgroup.go @@ -15,9 +15,10 @@ type OutputGroup struct { func (OutputGroup) Fields() []ent.Field { return []ent.Field{ - // Name of the output group + // Name of the output group. field.String("name").Optional(), + // Incomplete. // Indicates that one or more of the output group's files were not built // successfully (the generating action failed). field.Bool("incomplete").Optional(), @@ -28,10 +29,11 @@ func (OutputGroup) Fields() []ent.Field { func (OutputGroup) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the target completion object + // Edge back to the target completion object. edge.From("target_complete", TargetComplete.Type). Ref("output_group"), + // Inline Files. // Inlined files that belong to this output group, requested via // --build_event_inline_output_groups. edge.To("inline_files", TestFile.Type), diff --git a/ent/schema/packageloadmetrics.go b/ent/schema/packageloadmetrics.go index 042621e..8bee9a3 100644 --- a/ent/schema/packageloadmetrics.go +++ b/ent/schema/packageloadmetrics.go @@ -18,21 +18,20 @@ func (PackageLoadMetrics) Fields() []ent.Field { // Package Name field.String("name").Optional(), - //How long it took to load this package + // How long it took to load this package. field.Int64("load_duration"). - //GoType(time.Duration(0)). Optional(), - //number of targets using the package + // Bmber of targets using the package. field.Uint64("num_targets").Optional(), - //computation steps for the package + // Computation steps for the package. field.Uint64("computation_steps").Optional(), - //transitive loads + // Transitive loads. field.Uint64("num_transitive_loads").Optional(), - //package overhead + // Package overhead. field.Uint64("package_overhead").Optional(), } } @@ -40,7 +39,8 @@ func (PackageLoadMetrics) Fields() []ent.Field { // Edges of PackageLoadMetrics. func (PackageLoadMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the package metrics + + // Edge back to the package metrics edge.From("package_metrics", PackageMetrics.Type).Ref("package_load_metrics"), } } diff --git a/ent/schema/packagemetrics.go b/ent/schema/packagemetrics.go index 93be306..5b1fa8f 100644 --- a/ent/schema/packagemetrics.go +++ b/ent/schema/packagemetrics.go @@ -15,6 +15,7 @@ type PackageMetrics struct { func (PackageMetrics) Fields() []ent.Field { return []ent.Field{ + // Packages Loaded Count. // Number of BUILD files (aka packages) successfully loaded during this // build. // @@ -36,7 +37,7 @@ func (PackageMetrics) Fields() []ent.Field { func (PackageMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metrics object + // Edge back to the metrics object. edge.From("metrics", Metrics.Type).Ref("package_metrics"), // Loading time metrics per package. diff --git a/ent/schema/racestatistics.go b/ent/schema/racestatistics.go index 0cde362..3dd7170 100644 --- a/ent/schema/racestatistics.go +++ b/ent/schema/racestatistics.go @@ -16,7 +16,7 @@ type RaceStatistics struct { func (RaceStatistics) Fields() []ent.Field { return []ent.Field{ - //NOTE: Not currently included on the proto, but included here now for completeness + // NOTE: Not currently included on the proto, but included here now for completeness. // Mnemonic of the action. field.String("mnemonic").Optional(), @@ -39,7 +39,7 @@ func (RaceStatistics) Fields() []ent.Field { func (RaceStatistics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the dynamic execution metrics object + // Edge back to the dynamic execution metrics object. edge.From("dynamic_execution_metrics", DynamicExecutionMetrics.Type).Ref("race_statistics"), } } diff --git a/ent/schema/resourceusage.go b/ent/schema/resourceusage.go index e1fc004..8a3d84a 100644 --- a/ent/schema/resourceusage.go +++ b/ent/schema/resourceusage.go @@ -17,10 +17,10 @@ func (ResourceUsage) Fields() []ent.Field { //NOTE: not currently implemented on the proto but included here for completeness - //the name + // The name. field.String("name").Optional(), - //the value? + // The value. field.String("value").Optional(), } } @@ -29,7 +29,7 @@ func (ResourceUsage) Fields() []ent.Field { func (ResourceUsage) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the execution info + // Edge back to the execution info. edge.From("execution_info", ExectionInfo.Type). Ref("resource_usage"), } diff --git a/ent/schema/runnercount.go b/ent/schema/runnercount.go index 6d840f4..9ec455b 100644 --- a/ent/schema/runnercount.go +++ b/ent/schema/runnercount.go @@ -17,13 +17,13 @@ type RunnerCount struct { func (RunnerCount) Fields() []ent.Field { return []ent.Field{ - //the name of the runner + // The name of the runner. field.String("name").Optional(), - // the execition kind (local, remote, etc) + // The execition kind (local, remote, etc). field.String("exec_kind").Optional(), - //count of actions of this type executed + // Count of actions of this type executed. field.Int64("actions_executed").Optional(), } } @@ -32,7 +32,7 @@ func (RunnerCount) Fields() []ent.Field { func (RunnerCount) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the action summary + // Edge back to the action summary. edge.From("action_summary", ActionSummary.Type). Ref("runner_count"), } diff --git a/ent/schema/systemnetworkstats.go b/ent/schema/systemnetworkstats.go index e0e2c66..0e493f3 100644 --- a/ent/schema/systemnetworkstats.go +++ b/ent/schema/systemnetworkstats.go @@ -14,6 +14,7 @@ type SystemNetworkStats struct { // Fields of the SystemNetworkStats. func (SystemNetworkStats) Fields() []ent.Field { return []ent.Field{ + // Total bytes sent during the invocation. field.Uint64("bytes_sent").Optional(), @@ -44,7 +45,7 @@ func (SystemNetworkStats) Fields() []ent.Field { func (SystemNetworkStats) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the network metrics object + // Edge back to the network metrics object. edge.From("network_metrics", NetworkMetrics.Type).Ref("system_network_stats").Unique(), } } diff --git a/ent/schema/targetcomplete.go b/ent/schema/targetcomplete.go index 880e784..a44fb38 100644 --- a/ent/schema/targetcomplete.go +++ b/ent/schema/targetcomplete.go @@ -15,18 +15,19 @@ type TargetComplete struct { func (TargetComplete) Fields() []ent.Field { return []ent.Field{ - //did the target build successfully + // Did the target build successfully. field.Bool("success").Optional(), // List of tags associated with this configured target. field.Strings("tag").Optional(), + // Target Kind. // The kind of target (e.g., e.g. "cc_library rule", "source file", // "generated file") where the completion is reported. // Deprecated: use the target_kind field in TargetConfigured instead. field.String("target_kind").Optional(), - //time we saw the event complete for this target in unix + // Time we saw the event complete for this target in unix. field.Int64("end_time_in_ms").Optional(), // The timeout specified for test actions under this configured target. @@ -53,12 +54,13 @@ func (TargetComplete) Fields() []ent.Field { // Edges of the TargetComplete. func (TargetComplete) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the target pair + + // Edge back to the target pair. edge.From("target_pair", TargetPair.Type). Ref("completion"), - // Temporarily, also report the important outputs directly. This is only to - // allow existing clients help transition to the deduplicated representation; + // Temporarily, also report the important outputs directly. + // This is only to allow existing clients help transition to the deduplicated representation; // new clients should not use it. edge.To("important_output", TestFile.Type), diff --git a/ent/schema/targetconfigured.go b/ent/schema/targetconfigured.go index 8f4ad3f..ca154d4 100644 --- a/ent/schema/targetconfigured.go +++ b/ent/schema/targetconfigured.go @@ -15,19 +15,21 @@ type TargetConfigured struct { func (TargetConfigured) Fields() []ent.Field { return []ent.Field{ + // Tags. // List of all tags associated with this target (for all possible // configurations). field.Strings("tag").Optional(), - // The kind of target (e.g., e.g. "cc_library rule", "source file", + // The kind of target. + // (e.g., e.g. "cc_library rule", "source file", // "generated file") where the completion is reported. field.String("target_kind").Optional(), - // first time we saw this target + // First time we saw this target. field.Int64("start_time_in_ms").Optional(), // The size of the test, if the target is a test target. Unset otherwise. - //TODO is there somewway to reference this instead of repeating it? + // TODO is there somewway to reference this instead of repeating it? field.Enum("test_size"). Values("UNKNOWN", "SMALL", @@ -42,7 +44,7 @@ func (TargetConfigured) Fields() []ent.Field { func (TargetConfigured) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the target pair + // Edge back to the target pair. edge.From("target_pair", TargetPair.Type). Ref("configuration"), } diff --git a/ent/schema/targetmetrics.go b/ent/schema/targetmetrics.go index 3c0fa25..4f47f61 100644 --- a/ent/schema/targetmetrics.go +++ b/ent/schema/targetmetrics.go @@ -15,14 +15,17 @@ type TargetMetrics struct { func (TargetMetrics) Fields() []ent.Field { return []ent.Field{ + // Targets Loaded. // Size of the JVM heap post build in bytes. This is only collected if // --memory_profile is set, since it forces a full GC. field.Int64("targets_loaded").Optional(), + // Targets Configured. // Size of the peak JVM heap size in bytes post GC. Note that this reports 0 // if there was no major GC during the build. field.Int64("targets_configured").Optional(), + // Target Configured Not Including Aspects. // Size of the peak tenured space JVM heap size event in bytes post GC. Note // that this reports 0 if there was no major GC during the build. field.Int64("targets_configured_not_including_aspects").Optional(), @@ -33,7 +36,7 @@ func (TargetMetrics) Fields() []ent.Field { func (TargetMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metrics object + // Edge back to the metrics object. edge.From("metrics", Metrics.Type).Ref("target_metrics"), } } diff --git a/ent/schema/targetpair.go b/ent/schema/targetpair.go index 3982be6..c8d3431 100644 --- a/ent/schema/targetpair.go +++ b/ent/schema/targetpair.go @@ -15,16 +15,17 @@ type TargetPair struct { func (TargetPair) Fields() []ent.Field { return []ent.Field{ - //the label of the target ex: //foo:bar + // The label of the target ex: //foo:bar. field.String("label").Optional(), - // time from target configured message received and processed until target completed message received and processed, calculated on build complete + // Duration in Milliseconds. + // Time from target configured message received and processed until target completed message received and processed, calculated on build complete field.Int64("duration_in_ms").Optional(), - //overall success of the target (defaults to false) + // Overall success of the target (defaults to false). field.Bool("success").Optional().Default(false), - //the target kind if available + // The target kind if available. field.String("target_kind").Optional(), // The size of the test, if the target is a test target. Unset otherwise. @@ -58,14 +59,14 @@ func (TargetPair) Fields() []ent.Field { // Edges of the TargetPair. func (TargetPair) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the bazel invocation + // Edge back to the bazel invocation. edge.From("bazel_invocation", BazelInvocation.Type). Ref("targets"), - //edge to the target configuration object + // Edge to the target configuration object. edge.To("configuration", TargetConfigured.Type).Unique(), - //edge to the target completed object + // Edge to the target completed object. edge.To("completion", TargetComplete.Type).Unique(), } } diff --git a/ent/schema/testcollection.go b/ent/schema/testcollection.go index 2f3b484..6af96a1 100644 --- a/ent/schema/testcollection.go +++ b/ent/schema/testcollection.go @@ -15,10 +15,10 @@ type TestCollection struct { func (TestCollection) Fields() []ent.Field { return []ent.Field{ - //the label associated with this test + // The label associated with this test. field.String("label").Optional(), - //the overall status of the test + // The overall status of the test. field.Enum("overall_status"). Optional(). Values("NO_STATUS", @@ -32,16 +32,16 @@ func (TestCollection) Fields() []ent.Field { "TOOL_HALTED_BEFORE_TESTING"). Default("NO_STATUS"), - //the strategy of the test + // The strategy of the test. field.String("strategy").Optional(), - //if the test was cached locally + // If the test was cached locally. field.Bool("cached_locally").Optional(), - //if the test was cached remotely + // If the test was cached remotely. field.Bool("cached_remotely").Optional(), - //the test duration in ms + // The test duration in milliseconds. field.Int64("duration_ms").Optional(), } } @@ -49,14 +49,14 @@ func (TestCollection) Fields() []ent.Field { // Edges of the TestCollection. func (TestCollection) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the bazel invocaiton + // Edge back to the bazel invocaiton. edge.From("bazel_invocation", BazelInvocation.Type). Ref("test_collection"), - //the test summary aossicated with the test + // The test summary aossicated with the test. edge.To("test_summary", TestSummary.Type).Unique(), - //a collection of test results associated + // A collection of test results associated. edge.To("test_results", TestResultBES.Type), } } diff --git a/ent/schema/testfile.go b/ent/schema/testfile.go index a70c6f3..7cd9b3d 100644 --- a/ent/schema/testfile.go +++ b/ent/schema/testfile.go @@ -15,19 +15,21 @@ type TestFile struct { func (TestFile) Fields() []ent.Field { return []ent.Field{ - // Digest of the file, using the build tool's configured digest algorithm, + // Digest of the file. + // using the build tool's configured digest algorithm, // hex-encoded. field.String("digest").Optional(), - //TODO: implement file more fully, right now, just storing the URI + // TODO: implement file more fully, right now, just storing the URI. field.String("file").Optional(), // Length of the file in bytes. field.Int64("length").Optional(), - // identifier indicating the nature of the file (e.g., "stdout", "stderr") + // Identifier indicating the nature of the file (e.g., "stdout", "stderr"). field.String("name").Optional(), + // Prefix. // A sequence of prefixes to apply to the file name to construct a full path. // In most but not all cases, there will be 3 entries: // 1. A root output directory, eg "bazel-out" @@ -41,7 +43,7 @@ func (TestFile) Fields() []ent.Field { func (TestFile) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the test result + // Edge back to the test result. edge.From("test_result", TestResultBES.Type).Ref("test_action_output"), } } diff --git a/ent/schema/testresult.go b/ent/schema/testresult.go index c789108..fb74aba 100644 --- a/ent/schema/testresult.go +++ b/ent/schema/testresult.go @@ -28,16 +28,19 @@ func (TestResultBES) Fields() []ent.Field { "TOOL_HALTED_BEFORE_TESTING"). Default("NO_STATUS"), + // Status Details. // Additional details about the status of the test. This is intended for // user display and must not be parsed. field.String("status_details").Optional(), - //possibly redundant, could remove, but this is the label associated with this test + // The label. + // possibly redundant, could remove, but this is the label associated with this test field.String("label").Optional(), // Warnings generated by that test action. field.Strings("warning").Optional(), + // Cached locally. // True, if the reported attempt is taken from the tool's local cache. field.Bool("cached_locally").Optional(), @@ -52,12 +55,14 @@ func (TestResultBES) Fields() []ent.Field { // build. (Timestamp) field.String("test_attempt_start").Optional(), - // Time the test took to run. For locally cached results, this is the time + // Time the test took to run. For locally cached results. + // this is the time // the cached invocation took when it was invoked. // Deprecated, use `test_attempt_duration` instead. field.Int64("test_attempt_duration_millis").Optional(), - // Time the test took to run. For locally cached results, this is the time + // Time the test took to run. For locally cached results. + // this is the time // the cached invocation took when it was invoked. field.Int64("test_attempt_duration").Optional(), } @@ -67,7 +72,7 @@ func (TestResultBES) Fields() []ent.Field { func (TestResultBES) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the test collection + // Edge back to the test collection. edge.From("test_collection", TestCollection.Type).Ref("test_results").Unique(), // Files (logs, test.xml, undeclared outputs, etc) generated by that test action. diff --git a/ent/schema/testsummary.go b/ent/schema/testsummary.go index b1b0a56..e8d316e 100644 --- a/ent/schema/testsummary.go +++ b/ent/schema/testsummary.go @@ -57,7 +57,7 @@ func (TestSummary) Fields() []ent.Field { // The total runtime of the test. field.Int64("total_run_duration").Optional(), - //test target label, possibly redundant and could be removed + // Test target label, possibly redundant and could be removed. field.String("label").Optional(), } } @@ -66,7 +66,7 @@ func (TestSummary) Fields() []ent.Field { func (TestSummary) Edges() []ent.Edge { return []ent.Edge{ - //edge back tot he test collection + // Edge back tot he test collection. edge.From("test_collection", TestCollection.Type). Ref("test_summary"), diff --git a/ent/schema/timingbreakdown.go b/ent/schema/timingbreakdown.go index d92d26a..3899be9 100644 --- a/ent/schema/timingbreakdown.go +++ b/ent/schema/timingbreakdown.go @@ -15,10 +15,10 @@ type TimingBreakdown struct { func (TimingBreakdown) Fields() []ent.Field { return []ent.Field{ - //the name of the activity + // The name of the activity. field.String("name").Optional(), - //times spent ding the activity (duration) + // Time spent ding the activity (duration). //NOTE: proto has this as an int, but implemented as a string field.String("time").Optional(), } @@ -28,12 +28,12 @@ func (TimingBreakdown) Fields() []ent.Field { func (TimingBreakdown) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the execution info object + // Edge back to the execution info object edge.From("execution_info", ExectionInfo.Type).Ref("timing_breakdown"), - //timing children (this could probably be better reempleted as a node to itself... - //except the relationship to the executio info object. maybe we don't care about that? - //for now, an intermediate 'parent' object is used) + // Timing children (this could probably be better reempleted as a node to itself. + // except the relationship to the executio info object. maybe we don't care about that? + // for now, an intermediate 'parent' object is used) edge.To("child", TimingChild.Type), } } diff --git a/ent/schema/timingchild.go b/ent/schema/timingchild.go index 859ec11..f2ec9ad 100644 --- a/ent/schema/timingchild.go +++ b/ent/schema/timingchild.go @@ -15,11 +15,11 @@ type TimingChild struct { func (TimingChild) Fields() []ent.Field { return []ent.Field{ - //name of the activity + // Bame of the activity. field.String("name").Optional(), - //time spent performing the activity (duration) - //NOTE: proto has this as an int, but implemented as a string + // Time spent performing the activity (duration). + // NOTE: proto has this as an int, but implemented as a string field.String("time").Optional(), } } diff --git a/ent/schema/timingmetrics.go b/ent/schema/timingmetrics.go index f5efcb0..770b506 100644 --- a/ent/schema/timingmetrics.go +++ b/ent/schema/timingmetrics.go @@ -15,10 +15,9 @@ type TimingMetrics struct { func (TimingMetrics) Fields() []ent.Field { return []ent.Field{ + // The CPU time in milliseconds consumed during this build. // For Skymeld, it's possible that // analysis_phase_time_in_ms + execution_phase_time_in_ms >= wall_time_in_ms - // - // The CPU time in milliseconds consumed during this build. field.Int64("cpu_time_in_ms").Optional(), // The elapsed wall time in milliseconds during this build. @@ -35,7 +34,7 @@ func (TimingMetrics) Fields() []ent.Field { // actions) to the last. field.Int64("execution_phase_time_in_ms").Optional(), - // The elapsed wall time in milliseconds until the first action execution + // The elapsed wall time in milliseconds until the first action execution. // started (excluding workspace status actions). field.Int64("actions_execution_start_in_ms").Optional(), } @@ -45,7 +44,7 @@ func (TimingMetrics) Fields() []ent.Field { func (TimingMetrics) Edges() []ent.Edge { return []ent.Edge{ - //edge back to the metrics object + // Edge back to the metrics object. edge.From("metrics", Metrics.Type).Ref("timing_metrics"), } }