Iteration | Time taken in checkpointing run (ms) |
Time taken in the restore run (ms) |
---|---|---|
0 | 37101493 | 15505 |
100 | 106442 | 13759 |
200 | 46307 | 13480 |
300 | 29963 | 22211 |
400 | 31919 | 10546 |
500 | 18090 | 9150 |
600 | 15226 | 8032 |
700 | 15086 | 9639 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
import java.lang.*; | |
import java.text.*; | |
import jdk.crac.*; | |
public class PrimeTime implements jdk.crac.Resource { | |
/* - get the current time in milliseconds - T1 | |
- print the time as a human readable date | |
- reverse the digits in T1 to create a T2 | |
- print the time T2 as a human readable date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu/chiselled-jre:8-22.04_edge as chiselled-jdk8 | |
FROM ubuntu:16.04 | |
# Run as a non-root user | |
RUN addgroup --system test | |
RUN adduser --system testuser --ingroup test | |
USER testuser:test | |
COPY --from=chiselled-jdk8 /usr/lib/jvm/java-8-openjdk-amd64 /usr/lib/jvm/java-8-openjdk-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <openssl/evp.h> | |
#include <stdio.h> | |
typedef enum Algo { | |
AlgoDH, AlgoEC | |
} Algo; | |
int generate_shared_secret(EVP_PKEY *private_key, | |
EVP_PKEY *peer_public_key, | |
unsigned char **secret) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define _XOPEN_SOURCE_EXTENDED 1 | |
#define _OPEN_THREADS | |
#include <pthread.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> | |
#include <sys/time.h> | |
#include <netinet/in.h> | |
#include <errno.h> |
-
Files reside on disks. When they are opened, their contents are cached in the kernel space. They may also be cached in user-space by applications.
-
Reads and writes to files, by default, actually happen on their kernel-cached copy. The actual commit to the hard disk happens asynchronously, sometime later.
-
Of course, the OS kernels do ensure correctness of reads and writes in almost all the cases, while implementing optimizations to reduce the number of reads and writes from the disk sectors.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebSocket = require('ws'); | |
for (i=0; i < 50; i++) { | |
let ws = this.ws = new WebSocket("ws://localhost:9001/"); | |
ws.onopen = (event) => { | |
console.log("Websocket opened"); | |
ws.send("This is the first message that was sent"); | |
ws.send("This is the second message that was sent"); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Foo { | |
var bar | |
let foo | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Optional { | |
var isNil: Bool { | |
switch self { | |
case .none: return true | |
case .some: return false | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: [ | |
// Dependencies declare other packages that this package depends on. | |
.package(url: "https://github.com/IBM-Swift/Kitura", .branch("kitura-nio")), | |
], |
NewerOlder