Skip to content

Commit a79e014

Browse files
Merge pull request #2584 from madeline-underwood/typescr
Typescr_JA to sign off
2 parents 8a39791 + 4b79583 commit a79e014

File tree

6 files changed

+60
-71
lines changed

6 files changed

+60
-71
lines changed

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

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

84
minutes_to_complete: 30
95

10-
who_is_this_for: This is an introductory topic for software developers deploying and optimizing TypeScript workloads on Arm64 Linux environments, specifically using Google Cloud C4A virtual machines powered by Axion processors.
6+
who_is_this_for: This is an introductory topic for developers deploying and optimizing TypeScript workloads on Arm64 Linux environments, specifically using Google Cloud C4A virtual machines powered by Axion processors.
117

128
learning_objectives:
13-
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
14-
- Install TypeScript on a SUSE Arm64 (C4A) instance
15-
- Validate TypeScript functionality by creating, compiling, and running a simple TypeScript script on the Arm64 VM
16-
- Benchmark TypeScript performance using a JMH-style custom benchmark with perf_hooks on Arm64 architecture
9+
- Provision an Arm-based SUSE Linux Enterprise Server (SLES) virtual machine (VM) on Google Cloud
10+
- Install TypeScript on a SUSE Arm64 C4A instance
11+
- Validate TypeScript functionality by creating, compiling, and running a simple TypeScript script on a Arm64 VM
12+
- Benchmark TypeScript performance using a JMH-style custom benchmark with the perf_hooks module on Arm64 architecture
1713

1814
prerequisites:
1915
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
---
2-
title: Getting started with TypeScript on Google Axion C4A (Arm Neoverse-V2)
2+
title: Get started with TypeScript on Google Axion C4A instances
33

44
weight: 2
55

66
layout: "learningpathall"
77
---
88

9+
## Introduction
10+
11+
In this Learning Path, you'll deploy and benchmark TypeScript applications on Arm-based Google Cloud C4A instances powered by Axion processors. You'll provision a SUSE Linux Enterprise Server (SLES) virtual machine (VM), install and configure TypeScript, and measure performance using a JMH-style custom benchmark. This process shows you how to use TypeScript with Arm-based cloud infrastructure and helps you evaluate performance and compatibility for cloud-native workloads.
12+
13+
914
## Google Axion C4A Arm instances in Google Cloud
1015

11-
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
16+
Google Axion C4A is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, they offer strong performance for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
1217

13-
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.
18+
The C4A series provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture on Google Cloud.
1419

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.
20+
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).
1621

1722
## TypeScript
1823

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

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.
26+
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.
2227

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/).
28+
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 by visiting 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: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
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
10-
This section walks you through the baseline setup and validation of TypeScript on a Google Cloud C4A (Axion Arm64) virtual machine running SUSE Linux.
11-
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.
9+
## Overview
10+
This section walks you through the baseline setup and validation of TypeScript on a Google Cloud C4A (Axion Arm64) virtual machine running SUSE Linux. 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.
1211

13-
### Set Up a TypeScript Project
14-
Before running any tests, you’ll create a dedicated project directory and initialize a minimal TypeScript environment.
12+
## Create project folder
1513

16-
1. Create project folder
14+
Before running any tests, you’ll create a dedicated project directory and initialize a minimal TypeScript environment.
1715

1816
Start by creating a new folder to hold your TypeScript project files:
1917

@@ -23,15 +21,15 @@ cd ~/typescript-benchmark
2321
```
2422
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.
2523

26-
2. Initialize npm project
24+
## Initialize npm project
2725

28-
Next, initialize a new Node.js project. This creates a `package.json` file that defines your project metadata, dependencies, and scripts.
26+
Next, initialize a new Node.js project. This creates a `package.json` file that defines your project metadata, dependencies, and scripts:
2927

3028
```console
3129
npm init -y
3230
```
3331

34-
3. Install Node.js type definitions
32+
## Install Node.js type definitions
3533

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

@@ -55,10 +53,10 @@ You should see output similar to:
5553
}
5654
```
5755

58-
### Baseline Testing
56+
## Perform baseline testing
5957
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.
6058

61-
1. Create a Simple TypeScript File
59+
## Create a simple TypeScript file
6260

6361
Create a file named `hello.ts` with the following content:
6462

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

74-
2. Compile TypeScript
72+
## Compile TypeScript
7573

7674
Use the TypeScript compiler (tsc) to transpile the .ts file into JavaScript:
7775

@@ -80,7 +78,7 @@ tsc hello.ts
8078
```
8179
This generates a new file named `hello.js` in the same directory.
8280

83-
3. Run compiled JavaScript
81+
## Run compiled JavaScript
8482

8583
Now, execute the compiled JavaScript using Node.js. This step verifies that:
8684

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

Lines changed: 17 additions & 26 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
@@ -56,16 +56,16 @@ Code explanation:
5656

5757
This JMH-style benchmarking approach provides more accurate and repeatable performance metrics than a single execution, making it ideal for performance testing on Arm-based systems.
5858

59-
### Compile the TypeScript Benchmark
59+
## Compile the TypeScript Benchmark
6060
First, compile the benchmark file from TypeScript to JavaScript using the TypeScript compiler (tsc):
6161

6262
```console
6363
tsc benchmark_jmh.ts
6464
```
65-
This command transpiles your TypeScript code into standard JavaScript, generating a file named `benchmark_jmh.js` in the same directory.
66-
The resulting JavaScript can be executed by Node.js, allowing you to measure performance on your Google Cloud C4A (Arm64) virtual machine.
65+
This command converts your TypeScript file into JavaScript and creates a new file called `benchmark_jmh.js` in your project directory.
66+
You can now run this JavaScript file with Node.js to benchmark performance on your Google Cloud C4A (Arm64) VM.
6767

68-
### Run the Benchmark
68+
## Run the benchmark
6969
Now, execute the compiled JavaScript file with Node.js:
7070

7171
```console
@@ -87,33 +87,24 @@ Iteration 10: 0.673 ms
8787
8888
Average execution time over 10 iterations: 0.888 ms
8989
```
90+
## Interpret your TypeScript performance data
9091

91-
### Benchmark Metrics Explained
92+
Each iteration measures how long it takes to run the benchmarked function once, while the average execution time is calculated by dividing the total time for all runs by the number of iterations. Running the benchmark multiple times helps smooth out fluctuations caused by factors like CPU scheduling, garbage collection, or memory caching. This approach produces more consistent and meaningful performance data, similar to the methodology used by Java’s JMH benchmarking framework.
9293

93-
* Iteration times → Each iteration represents the time taken for one complete execution of the benchmarked function.
94-
* 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.
95-
* Why multiple iterations?
96-
A single run can be affected by transient factors such as CPU scheduling, garbage collection, or memory caching.
97-
Running multiple iterations and averaging the results smooths out variability, producing more repeatable and statistically meaningful data, similar to Java’s JMH benchmarking methodology.
98-
99-
### Interpretation
94+
The average execution time reflects how efficiently the function executes under steady-state conditions. 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.
10095

101-
The average execution time reflects how efficiently the function executes under steady-state conditions.
102-
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.
103-
104-
### Benchmark summary on Arm64
96+
## Benchmark summary
10597
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
10698

10799
| Iteration | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Average |
108100
|-----------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|---------|
109101
| Time (ms) | 2.286 | 0.749 | 1.145 | 0.674 | 0.671 | 0.671 | 0.672 | 0.667 | 0.667 | 0.673 | 0.888 |
102+
## Summarize TypeScript benchmarking results on Arm64
110103

111-
### TypeScript performance benchmarking summary on Arm64
112-
113-
When you look at the benchmarking results, you will notice that on the Google Axion C4A Arm-based instances:
104+
Here’s what the benchmark results show for Google Axion C4A Arm-based instances:
114105

115-
- The average execution time on Arm64 (~0.888 ms) shows that CPU-bound TypeScript operations run efficiently on Arm-based VMs.
116-
- Initial iterations may show slightly higher times due to runtime warm-up and optimization overhead, which is common across architectures.
117-
- Arm64 demonstrates stable iteration times after the first run, indicating consistent performance for repeated workloads.
106+
- The average execution time on Arm64 is about 0.888 ms, which means TypeScript code runs efficiently on Arm-based VMs.
107+
- The first run is usually a bit slower because Node.js is warming up and optimizing the code. This is normal for all architectures.
108+
- After the first run, the times are very consistent, showing that Arm64 delivers stable performance for repeated tasks.
118109

119-
This demonstrates that Google Cloud C4A Arm64 virtual machines provide production-grade stability and throughput for TypeScript workloads, whether used for application logic, scripting, or performance-critical services.
110+
These results confirm that Google Cloud C4A Arm64 virtual machines are reliable and fast for running TypeScript workloads, whether you’re building application logic, scripts, or performance-sensitive services.

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ weight: 4
66
layout: learningpathall
77
---
88

9-
## Install TypeScript on GCP VM
9+
## Overview
1010
This section walks you through installing TypeScript and its dependencies on a Google Cloud Platform (GCP) SUSE Arm64 virtual machine. You’ll install Node.js, npm, TypeScript, and ts-node, and verify that everything works correctly.
1111

12-
Running TypeScript on Google Cloud C4A instances, powered by Axion Arm64 processors, provides a high-performance and energy-efficient platform for Node.js-based workloads.
12+
Running TypeScript on Google Cloud C4A instances, powered by Axion Arm64 processors provides a high-performance and energy-efficient platform for Node.js-based workloads.
1313

14-
### Update SUSE System
14+
## Update SUSE system
1515
Before installing new packages, refresh the repositories and update existing ones to ensure your environment is current and secure:
1616

1717
```console
1818
sudo zypper refresh
1919
sudo zypper update -y
2020
```
21-
Keeping your system up to date ensures that dependencies, libraries, and compilers required for Node.js and TypeScript work seamlessly on the Arm64 architecture.
21+
Updating your system helps make sure all the tools and libraries you need for Node.js and TypeScript work smoothly on Arm64.
2222

23-
### Install Node.js and npm
24-
Node.js provides the JavaScript runtime that powers TypeScript execution, while npm (Node Package Manager) manages project dependencies and global tools.
23+
## Install Node.js and npm
24+
Node.js is the JavaScript runtime that runs your TypeScript code. npm is the tool you use to install and manage packages and tools for your projects.
2525

2626
Install both packages using SUSE’s repositories:
2727

@@ -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 installation
4747
Check that Node.js, npm, TypeScript, and ts-node are all installed correctly:
4848

4949
```console
@@ -66,5 +66,4 @@ Version 5.9.3
6666
v10.9.2
6767
```
6868

69-
Node.js, npm, and TypeScript are now successfully installed and verified on your Google Cloud C4A (Arm64) virtual machine.
70-
You’re ready to create and execute TypeScript scripts for testing, deployment, or performance benchmarking.
69+
You’ve now installed and verified Node.js, npm, and TypeScript on your Google Cloud C4A (Arm64) virtual machine. You’re ready to start creating and running TypeScript scripts for testing, deployment, or performance checks.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ layout: learningpathall
88

99
## Overview
1010

11-
In this section, you will learn how to provision a Google Axion C4A Arm virtual machine on Google Cloud Platform (GCP) using the `c4a-standard-4` (4 vCPUs, 16 GB memory) machine type in the Google Cloud Console.
11+
In this section, you'll set up a Google Axion C4A Arm virtual machine on Google Cloud Platform (GCP) using the `c4a-standard-4` machine type. This instance gives you four virtual CPUs and 16 GB of memory. You'll use the Google Cloud Console to complete each step.
1212

1313
{{% notice Note %}}
1414
For support on GCP setup, see the Learning Path [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).
1515
{{% /notice %}}
1616

17-
## Provision a Google Axion C4A Arm VM in Google Cloud Console
17+
## Create the virtual machine
1818

19-
To create a virtual machine based on the C4A instance type:
19+
To create the virtual machine, follow these steps:
2020
- Navigate to the [Google Cloud Console](https://console.cloud.google.com/).
2121
- Go to **Compute Engine > VM Instances** and select **Create Instance**.
2222
- Under **Machine configuration**:
@@ -26,6 +26,6 @@ To create a virtual machine based on the C4A instance type:
2626

2727
![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console")
2828

29-
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your Operating System. Ensure you select the **Arm image** variant. Click **Select**.
29+
- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your operating system. Ensure you select the **Arm image** variant. Click **Select**.
3030
- Under **Networking**, enable **Allow HTTP traffic**.
3131
- Click **Create** to launch the instance.

0 commit comments

Comments
 (0)