Skip to content

Commit f5c7125

Browse files
Refactor documentation: update titles and section headings for clarity and consistency across TypeScript guides
1 parent be872df commit f5c7125

File tree

5 files changed

+22
-26
lines changed

5 files changed

+22
-26
lines changed

content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/_index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
---
22
title: Deploy TypeScript on Google Cloud C4A (Arm-based Axion VMs)
3-
4-
draft: true
5-
cascade:
6-
draft: true
73

84
minutes_to_complete: 30
95

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Getting started with TypeScript on Google Axion C4A (Arm Neoverse-V2)
2+
title: Getting started with TypeScript
33

44
weight: 2
55

@@ -12,12 +12,12 @@ Google Axion C4A is a family of Arm-based virtual machines built on Google’s c
1212

1313
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
1414

15-
To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog.
15+
To learn more about Google Axion, see the Google blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
1616

1717
## TypeScript
1818

19-
TypeScript is an open-source, strongly typed programming language developed and maintained by Microsoft.
19+
TypeScript is an open-source, strongly-typed programming language developed and maintained by Microsoft.
2020

21-
It is a superset of JavaScript, which means all valid JavaScript code is also valid TypeScript, but TypeScript adds static typing, interfaces, and advanced tooling to help developers write more reliable and maintainable code.
21+
TypeScript builds on JavaScript by adding features like static typing and interfaces. Any valid JavaScript code works in TypeScript, but TypeScript gives you extra tools to write code that is easier to maintain and less prone to errors.
2222

23-
TypeScript is widely used for web applications, server-side development (Node.js), and large-scale JavaScript projects** where type safety and code quality are important. Learn more from the [TypeScript official website](https://www.typescriptlang.org/) and its [handbook and documentation](https://www.typescriptlang.org/docs/).
23+
TypeScript is widely used for web applications, server-side development (Node.js), and large-scale JavaScript projects where type safety and code quality are important. Learn more from the [TypeScript official website](https://www.typescriptlang.org/) and the [TypeScript handbook and documentation](https://www.typescriptlang.org/docs/).

content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/baseline.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
---
2-
title: TypeScript Baseline Testing on Google Axion C4A Arm Virtual Machine
2+
title: Establish a TypeScript performance baseline
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9-
## Baseline Setup for TypeScript
9+
## Set up your TypeScript baseline
1010
This section walks you through the baseline setup and validation of TypeScript on a Google Cloud C4A (Axion Arm64) virtual machine running SUSE Linux.
1111
The goal is to confirm that your TypeScript environment is functioning correctly, from initializing a project to compiling and executing a simple TypeScript file, ensuring a solid foundation before performance or benchmarking steps.
1212

13-
### Set Up a TypeScript Project
13+
## Set Up a TypeScript Project
1414
Before running any tests, you’ll create a dedicated project directory and initialize a minimal TypeScript environment.
1515

16-
1. Create project folder
16+
### Create project folder
1717

1818
Start by creating a new folder to hold your TypeScript project files:
1919

@@ -23,15 +23,15 @@ cd ~/typescript-benchmark
2323
```
2424
This creates a workspace named `typescript-benchmark` in your home directory, ensuring all TypeScript configuration and source files are organized separately from system files and global modules.
2525

26-
2. Initialize npm project
26+
### Initialize npm project
2727

2828
Next, initialize a new Node.js project. This creates a `package.json` file that defines your project metadata, dependencies, and scripts.
2929

3030
```console
3131
npm init -y
3232
```
3333

34-
3. Install Node.js type definitions
34+
### Install Node.js type definitions
3535

3636
To enable TypeScript to properly recognize Node.js built-in APIs (like fs, path, and process), install the Node.js type definitions package:
3737

@@ -55,10 +55,10 @@ You should see output similar to:
5555
}
5656
```
5757

58-
### Baseline Testing
58+
## Perform baseline testing
5959
With the TypeScript environment configured, you’ll now perform a baseline functionality test to confirm that TypeScript compilation and execution work correctly on your Google Cloud SUSE Arm64 VM.
6060

61-
1. Create a Simple TypeScript File
61+
### Create a Simple TypeScript File
6262

6363
Create a file named `hello.ts` with the following content:
6464

@@ -71,7 +71,7 @@ console.log(greet("GCP SUSE ARM64"));
7171
```
7272
This simple function demonstrates TypeScript syntax, type annotations, and basic console output.
7373

74-
2. Compile TypeScript
74+
### Compile TypeScript
7575

7676
Use the TypeScript compiler (tsc) to transpile the .ts file into JavaScript:
7777

@@ -80,7 +80,7 @@ tsc hello.ts
8080
```
8181
This generates a new file named `hello.js` in the same directory.
8282

83-
3. Run compiled JavaScript
83+
### Run compiled JavaScript
8484

8585
Now, execute the compiled JavaScript using Node.js. This step verifies that:
8686

content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/benchmarking.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: TypeScript Benchmarking
2+
title: Benchmark TypeScript performance
33
weight: 6
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

99

10-
## JMH-style Custom Benchmarking
10+
## Create a custom JMH-style benchmark for TypeScript on Arm
1111

1212
This section demonstrates how to benchmark TypeScript functions using a JMH-style (Java Microbenchmark Harness) methodology implemented with Node.js's built-in `perf_hooks` module.
1313
Unlike basic `console.time()` measurements, this approach executes multiple iterations, computes the average runtime, and produces stable and repeatable performance data, useful for evaluating workloads on your Google Cloud C4A (Axion Arm64) VM running SUSE Linux.
1414

15-
### Create the Benchmark Script
15+
## Implement benchmarking with Node.js perf_hooks on Arm
1616
Create a file named `benchmark_jmh.ts` inside your project directory with the content below:
1717

1818
```typescript
@@ -88,15 +88,15 @@ Iteration 10: 0.673 ms
8888
Average execution time over 10 iterations: 0.888 ms
8989
```
9090

91-
### Benchmark Metrics Explained
91+
## Run and analyze TypeScript benchmark results on Google Axion C4A
9292

9393
* Iteration times → Each iteration represents the time taken for one complete execution of the benchmarked function.
9494
* Average execution time → Calculated as the total of all iteration times divided by the number of iterations. This gives a stable measure of real-world performance.
9595
* Why multiple iterations?
9696
A single run can be affected by transient factors such as CPU scheduling, garbage collection, or memory caching.
9797
Running multiple iterations and averaging the results smooths out variability, producing more repeatable and statistically meaningful data, similar to Java’s JMH benchmarking methodology.
9898

99-
### Interpretation
99+
### Interpret your TypeScript performance data on Arm
100100

101101
The average execution time reflects how efficiently the function executes under steady-state conditions.
102102
The first iteration often shows higher latency because Node.js performing initial JIT (Just-In-Time) compilation and optimization, a common warm-up behavior in JavaScript/TypeScript benchmarks.

content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ sudo zypper install -y nodejs npm
3030
```
3131
This command installs the Node.js runtime and npm package manager on your Google Cloud SUSE Arm64 VM.
3232

33-
### Install TypeScript globally
33+
## Install TypeScript globally
3434
TypeScript (tsc) is the compiler that converts .ts files into JavaScript.
3535
`ts-node` lets you run TypeScript files directly without pre-compiling them. It is useful for testing, scripting, and lightweight development workflows.
3636

@@ -43,7 +43,7 @@ The `-g` flag installs packages globally, making tsc and ts-node available syste
4343

4444
This approach simplifies workflows for developers running multiple TypeScript projects on the same VM.
4545

46-
### Verify installations
46+
## Verify installations
4747
Check that Node.js, npm, TypeScript, and ts-node are all installed correctly:
4848

4949
```console

0 commit comments

Comments
 (0)