You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/_index.md
+6-10Lines changed: 6 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,15 @@
1
1
---
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
7
3
8
4
minutes_to_complete: 30
9
5
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.
11
7
12
8
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
17
13
18
14
prerequisites:
19
15
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled
title: Getting started with TypeScript on Google Axion C4A (Arm Neoverse-V2)
2
+
title: Get started with TypeScript on Google Axion C4A instances
3
3
4
4
weight: 2
5
5
6
6
layout: "learningpathall"
7
7
---
8
8
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
+
9
14
## Google Axion C4A Arm instances in Google Cloud
10
15
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.
12
17
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.
14
19
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).
16
21
17
22
## TypeScript
18
23
19
-
TypeScript is an open-source, stronglytyped programming language developed and maintained by Microsoft.
24
+
TypeScript is an open-source, strongly-typed programming language developed and maintained by Microsoft.
20
25
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.
22
27
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/).
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/baseline.md
+12-14Lines changed: 12 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,17 @@
1
1
---
2
-
title: TypeScript Baseline Testing on Google Axion C4A Arm Virtual Machine
2
+
title: Establish a TypeScript performance baseline
3
3
weight: 5
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
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.
12
11
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
15
13
16
-
1. Create project folder
14
+
Before running any tests, you’ll create a dedicated project directory and initialize a minimal TypeScript environment.
17
15
18
16
Start by creating a new folder to hold your TypeScript project files:
19
17
@@ -23,15 +21,15 @@ cd ~/typescript-benchmark
23
21
```
24
22
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.
25
23
26
-
2. Initialize npm project
24
+
##Initialize npm project
27
25
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:
29
27
30
28
```console
31
29
npm init -y
32
30
```
33
31
34
-
3. Install Node.js type definitions
32
+
##Install Node.js type definitions
35
33
36
34
To enable TypeScript to properly recognize Node.js built-in APIs (like fs, path, and process), install the Node.js type definitions package:
37
35
@@ -55,10 +53,10 @@ You should see output similar to:
55
53
}
56
54
```
57
55
58
-
### Baseline Testing
56
+
##Perform baseline testing
59
57
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.
60
58
61
-
1. Create a Simple TypeScript File
59
+
##Create a simple TypeScript file
62
60
63
61
Create a file named `hello.ts` with the following content:
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/benchmarking.md
+17-26Lines changed: 17 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,18 @@
1
1
---
2
-
title: TypeScript Benchmarking
2
+
title: Benchmark TypeScript performance
3
3
weight: 6
4
4
5
5
### FIXED, DO NOT MODIFY
6
6
layout: learningpathall
7
7
---
8
8
9
9
10
-
## JMH-style Custom Benchmarking
10
+
## Create a custom JMH-style benchmark for TypeScript on Arm
11
11
12
12
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.
13
13
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.
14
14
15
-
### Create the Benchmark Script
15
+
##Implement benchmarking with Node.js perf_hooks on Arm
16
16
Create a file named `benchmark_jmh.ts` inside your project directory with the content below:
17
17
18
18
```typescript
@@ -56,16 +56,16 @@ Code explanation:
56
56
57
57
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.
58
58
59
-
###Compile the TypeScript Benchmark
59
+
## Compile the TypeScript Benchmark
60
60
First, compile the benchmark file from TypeScript to JavaScript using the TypeScript compiler (tsc):
61
61
62
62
```console
63
63
tsc benchmark_jmh.ts
64
64
```
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.jsto benchmark performance on your Google Cloud C4A (Arm64) VM.
67
67
68
-
###Run the Benchmark
68
+
## Run the benchmark
69
69
Now, execute the compiled JavaScript file with Node.js:
70
70
71
71
```console
@@ -87,33 +87,24 @@ Iteration 10: 0.673 ms
87
87
88
88
Average execution time over 10 iterations: 0.888 ms
89
89
```
90
+
## Interpret your TypeScript performance data
90
91
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.
92
93
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.
100
95
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
105
97
Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE):
## Summarize TypeScript benchmarking results on Arm64
110
103
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:
114
105
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.
118
109
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.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/installation.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,22 +6,22 @@ weight: 4
6
6
layout: learningpathall
7
7
---
8
8
9
-
## Install TypeScript on GCP VM
9
+
## Overview
10
10
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.
11
11
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.
13
13
14
-
###Update SUSE System
14
+
## Update SUSE system
15
15
Before installing new packages, refresh the repositories and update existing ones to ensure your environment is current and secure:
16
16
17
17
```console
18
18
sudo zypper refresh
19
19
sudo zypper update -y
20
20
```
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.
22
22
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.
This command installs the Node.js runtime and npm package manager on your Google Cloud SUSE Arm64 VM.
32
32
33
-
###Install TypeScript globally
33
+
## Install TypeScript globally
34
34
TypeScript (tsc) is the compiler that converts .ts files into JavaScript.
35
35
`ts-node` lets you run TypeScript files directly without pre-compiling them. It is useful for testing, scripting, and lightweight development workflows.
36
36
@@ -43,7 +43,7 @@ The `-g` flag installs packages globally, making tsc and ts-node available syste
43
43
44
44
This approach simplifies workflows for developers running multiple TypeScript projects on the same VM.
45
45
46
-
###Verify installations
46
+
## Verify installation
47
47
Check that Node.js, npm, TypeScript, and ts-node are all installed correctly:
48
48
49
49
```console
@@ -66,5 +66,4 @@ Version 5.9.3
66
66
v10.9.2
67
67
```
68
68
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.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/typescript-on-gcp/instance.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ layout: learningpathall
8
8
9
9
## Overview
10
10
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.
12
12
13
13
{{% notice Note %}}
14
14
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/).
15
15
{{% /notice %}}
16
16
17
-
## Provision a Google Axion C4A Arm VM in Google Cloud Console
17
+
## Create the virtual machine
18
18
19
-
To create a virtual machine based on the C4A instance type:
19
+
To create the virtual machine, follow these steps:
20
20
- Navigate to the [Google Cloud Console](https://console.cloud.google.com/).
21
21
- Go to **Compute Engine > VM Instances** and select **Create Instance**.
22
22
- Under **Machine configuration**:
@@ -26,6 +26,6 @@ To create a virtual machine based on the C4A instance type:
26
26
27
27

28
28
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**.
30
30
- Under **Networking**, enable **Allow HTTP traffic**.
0 commit comments